Flag-staff subtending greatest angle 
A person moving towards a house observes that a flag-staff on the top of the house subtends the greatest angle $\theta$ when his distance from the house is d. Prove the heights of the flag staff and the house are $2d.tan\theta$ and $d.tan(45-\theta/2)$ respectively.

Le OP be the house and PQ be the flag-staff. And let A be the point where a circle through P and Q touches the ground. The book says that at A, PQ will subtend the greatest angle. I wonder why. Also, the book says $\angle AQP=\angle OAP$. I didn't understand this either.
 A: The reasoning is the following. Let $C$ be a point at the "ground" (the line through the point $O $ perpendicular to $ OP $) distinct from $O$. Draw a circle through $P $, $Q $ and $C$. In general the circle will intersect the line $OC$ at one further point $C'$. As easy to see both points $C$ and $C'$ lie in the same semiplane with respect to the line $OP$. The center of the circle lies in the same semiplane as well. By the inscribed angle theorem the segment $PQ $ subtends the same angle (equal to the half of the central angle) for every point of the circle lying in the the semiplane, particularly for the points $C$ and $C'$. Now observe that for these circle points the smaller is the radius of the circle the larger is the subtended  angle. But if the radius is too small the circle does not intersect the "ground". It follows that the subtended angle for points lying on the "ground" attains the largest value when the "ground" is tangent to the circle.
The equality $\angle AQP=\angle OAP $ is a corollary of the inscribed angle theorem, saying that the angle subtended by a chord and the tangent line at one of its endpoints equals half of the central angle subtended by the chord.
