The ladder leaning against the wall forms a right angled triangle with the gound and the wall. So we can use the formula:
a² + b² = c²
The ladder is the hypotenuse c²
The vertical leg is b²
The base or horizontal leg is a²
We need to find the length of the base a², so:
a² = c² - b²
a² = 5² - 4²
a² = 25 - 16
a² = 9
a = √9
a = 3
Therefore the bottom of the ladder must be 3 feet from the wall.