When the ladder is sent against the wall then the ladder and the wall and the ground form a right angled triangle.
With hypotenuse (ladder)=45
Opposite side(height at the window)=27
BY USING PYTHAGORAS THEOREM
Therefore the ladder is 36ft away from the wall.