Let L represent the ladder length, and x the distance the horiz. ladder reaches out from the wall. Then L = x + 3, where x is the distance of the bottom of the ladder from the wall when the top of the ladder is 9 ft. above the ground.
Consider the triangle formed by the hypotenuse (L, same as ladder length), the (vertical) side opposite the angle formed by the hypo. (with length 9 ft) and the horiz side (which we will call x). Then, according to the Pythagorean Theorem, L^2 = x^2 + 9^2. But L = x + 3, and L^2 = x^2 + 6x + 9 = x^2 + 9^2. Solving this equation results in x=3. 6x + 9 = 9^2, or 6x + 9 = 81 6x = 72 x = 12