To find the height of the square pyramid, we can use the Pythagorean Theorem. The Pythagorean Theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides.
In this case, the height of the pyramid is one of the sides of the right triangle, and the slant height (25 ft) and the base length (40 ft) are the other two sides. We can use the Pythagorean Theorem to find the height, h:
h^2 + 40^2 = 25^2
h^2 + 1600 = 625
h^2 = 625 - 1600
h^2 = 975
h ≈ √975
h ≈ 31.2 ft
Therefore, the height of the square pyramid, h, is approximately 31.2 ft.