you can consider that the ground, the wall and the ladder form a right triangle.
Consider that the length of the ladder is the hypotenuse of the triangle and the distance from the ground to the top of the ladder is one side of the triangle. A scheme is shown below:
By using the Pythagorean theorem you have:
15² = x² + 12²
solve the previous equation for x:
x² = 15² - 12²
x² = 225 - 144
x² = 81
x = √81
x = 9
Hence, the base of the ladder is 9 ft far away from the base of the wall.