Let distance of the car from p be x. And initial height be y.
So, y/x=tan25 --------------------(1)
And After ascending 50 metres
(y + 50)/x = tan30 ----------------------(2)
Dividing (2) by (1) we get
(y+50)/y = tan30/tan25
=> (y+50)/y = 1.2381316478
=>y + 50 = 1.238131 y
=> 1.238131 y - y = 50
=> y = 50/0.238131
=> y = 209.967891
Therefore, x = y/tan25 ------ from (1)
So, x = 450.277596 m
Complete answer with picture:
https://ibb.co/TYVX7qq