A 50-ft flagpole stands on the top of a 25-ft building. How far from the base of the building should a person stand if the flagpole and the building are to subtend equal angles at her eye, which is 5 ft above the ground?
There is a simpler solution possible using the angle bisector theorem ...
The segment from eyeball to top of building cuts the opposite side in a ratio of 25:50, or 1:2
Adjacent sides of large triangle (eyeball to base of building & eyeball to top of flag) will also be in a 1:2 ratio.
Pythagoras ...
$x^2+5^2=a^2$
$x^2+70^2=(2a)^2 \implies x^2+70^2=4(x^2+5^2) \implies 4800=3x^2 \implies x = 40$
see link ... click on the question mark (?)
angle-bisector-theorem