To solve for the height \( h \) of the square pyramid using the Pythagorean theorem, we can identify the right triangle formed by the height, the slant height, and half of the length of the base.
Given:
- Slant height \( l = 25 \) feet
- Length of the base edge \( = 40 \) feet
- Half of the base edge \( = \frac{40}{2} = 20 \) feet
We can set up the Pythagorean theorem as follows:
\[ l^2 = h^2 + \left(\frac{\text{base edge length}}{2}\right)^2 \]
Substituting in the known values:
\[ 25^2 = h^2 + 20^2 \]
Calculating the squares:
\[ 625 = h^2 + 400 \]
Now, subtract 400 from both sides:
\[ 625 - 400 = h^2 \] \[ 225 = h^2 \]
Taking the square root of both sides:
\[ h = \sqrt{225} = 15 \]
Thus, the height \( h \) of the square pyramid is \( 15.0 \) feet.
The final answer is:
15.0 ft.