You'll want to draw a triangle; if you imagine the ladder leaning against the building, it forms a right triangle with height "a" being the distance from the ground to the window, and the hypotenuse "c" being the length of the ladder. We want to solve for base "b", the distance between the foot of the ladder and the building.
Recall the Pythagorean theorem:
a^2 + b^2 = c^2
We know that a = 6 and c = 9. Plug these values in, and solve for b.