We can draw the situation as follows:
We have here a right triangle with two known legs. We can apply the Pythagorean Theorem to find the hypothenuse of the triangle, and, thus, the length of the ladder need to reach the window.
We know that:
If we take the square root to both sides of the equation, we finally have:
Then, the length of the ladder needs to be 10 ft to reach the window.