Here is a picture that represents what you have explained. the ladder measurement is 90 feet and the ground distance between the house and base of the ladder is 45 feet so you are just missing the distance to the window. Use the following:
A^2 + B^2 = C^2
C is the Hypotenuse of the right triangle which in this case is the ladder. We will call A the ground distance and B is unknown
So if you have 45^2 + B^2 = 90^2 then you just have to solve for B
2025 + B^2 = 8100
subtract 2025 from each side leaving
B^2 = 6075
Then take the square root of both sides which leaves
B= 77.942 which rounds to 78
The distance to the window is 78 Feet. You should be able to create your own data for the remainder of the question using the same formula.