Let we create a right angle triangle `ABP` with the given details.
Please refer to video to see the triangle.
Then,
`tanA = (BP)/(AB)`
`tanP = (AB)/(BP)`
It is given,
`tanA = tanP`
`:. (BP)/(AB) = (AB)/(BP)`
`=>BP^2 = AB^2`
`=>BP = AB`
We know, opposite angles of equal sides are also equal.
`:. /_A = /_P`