To find the length of the base of the square pyramid, let's denote the following:
- Let the length of the base side of the square pyramid be \( b \).
- The height of the pyramid (perpendicular from the apex to the center of the base) is 20 miles.
- The slant height (length from the apex to the midpoint of a side of the base) is 25 miles.
In this case, we can visualize the problem as a right triangle formed by:
- The height of the pyramid (20 miles).
- Half of the base length (\(\frac{b}{2}\)).
- The slant height (25 miles) is the hypotenuse of the triangle.
Using the Pythagorean theorem (which states that \( a^2 + b^2 = c^2 \) where \( c \) is the hypotenuse):
\[ \left(\frac{b}{2}\right)^2 + 20^2 = 25^2 \]
Calculating:
- \( 20^2 = 400 \)
- \( 25^2 = 625 \)
Putting these values into the equation:
\[ \left(\frac{b}{2}\right)^2 + 400 = 625 \]
Now, isolate \(\left(\frac{b}{2}\right)^2\):
\[ \left(\frac{b}{2}\right)^2 = 625 - 400 \]
\[ \left(\frac{b}{2}\right)^2 = 225 \]
Taking the square root of both sides:
\[ \frac{b}{2} = \sqrt{225} = 15 \]
Now multiply by 2 to find \( b \):
\[ b = 2 \times 15 = 30 \]
Therefore, the length of the base of the square pyramid is 30 miles long.