I would solve this using tangents. Let h be height of flagpole.
Set up 2 right triangles, each with a base of 40.
The larger triangle has height of "h+70"
Smaller triangle has height of 70.
Now write the tangent ratios:
[tex]tan A = \frac{h+70}{40} , tan B = \frac{70}{40} [/tex]
Note: A-B = 9
To solve for h we need to use the "Difference Angle" formula for Tangent
[tex]tan (A-B) = \frac{tanA - tanB}{1+tan A tan B}[/tex]
Plug in what we know:
[tex]tan(9) = \frac{ \frac{h+70}{40} - \frac{70}{40}}{1+ (\frac{h+70}{40})(\frac{7}{4})} [/tex]
[tex]tan (9) = \frac{ \frac{h}{40}}{ \frac{7h +650}{160}} = \frac{4h}{7h+650} [/tex]
[tex]h = \frac{650 tan(9)}{4-7 tan(9)}[/tex]
[tex]h = 35.6[/tex]