To find the length of the base of the square pyramid, we can use the Pythagorean theorem based on the right triangle formed by half of the base, the height of the pyramid, and the slant height.
Let's define the variables:
- Let \( x \) be the length of the base of the pyramid.
- The height (the vertical leg) of the pyramid is given as \( 20 \text{ mi} \).
- The slant height (the hypotenuse) is given as \( 25 \text{ mi} \).
Since the right triangle formed will have:
- One leg as half of the base: \( \frac{x}{2} \)
- The other leg as the height: \( 20 \text{ mi} \)
- The hypotenuse as the slant height: \( 25 \text{ mi} \)
Using the Pythagorean theorem:
\[ \left(\frac{x}{2}\right)^{2} + (20)^{2} = (25)^{2} \]
Calculating each term:
- \( (20)^{2} = 400 \)
- \( (25)^{2} = 625 \)
Now we can substitute back into the equation:
\[ \left(\frac{x}{2}\right)^{2} + 400 = 625 \]
To isolate \( \left(\frac{x}{2}\right)^{2} \), subtract \( 400 \) from both sides:
\[ \left(\frac{x}{2}\right)^{2} = 625 - 400 \] \[ \left(\frac{x}{2}\right)^{2} = 225 \]
Now take the square root of both sides:
\[ \frac{x}{2} = 15 \]
To find \( x \), multiply both sides by \( 2 \):
\[ x = 30 \]
Therefore, the length of the base of the square pyramid is \( \boxed{30} \text{ mi} \).