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:
Note: A-B = 9 To solve for h we need to use the "Difference Angle" formula for Tangent Plug in what we know: