You have to draw a diagram to see what is happening.

Stack.pdf

Sorry I still can't upload images but here is a PDF with the pictures.

From this we can use the Pythagorean theorem to get

Now using the angles of elevation we get

Now just plug into the first equation and solve for h.