A certain city has a circular wall around it, and this wall has four gates pointing north, south, east, and west. A house stands outside the city, 3 km north of the north gate, and it can just be seen from a point 9 km east of the south gate. What is the diameter of the wall that surrounds the city?
Show Hint
Visualising the layout and assigning coordinates simplifies circular geometry problems involving gates and tangents.
Let $R$ be radius of the wall. North gate is at distance $R$ from centre, south gate opposite side also at $R$. House is 3 km north of north gate $\Rightarrow$ from centre distance = $R + 3$. Point 9 km east of south gate is at coordinates $(R+9, -R)$. Distance between house and observation point is tangent line to circle. Using geometry, right triangle with vertical leg $(R+3) + R = 2R+3$ and horizontal leg $R+9$. Pythagoras on tangent condition gives $R = 6$, hence diameter $= 12$ km.