Think of this as a triangle. The height is 3 miles and the side is 4. It's a 3,4,5 triangle. You are using the Pyhtagorean Theorem to find the hypotenuse, or the diagonal distance. 3 squared plus 4 squared equals the perfect square of the distance. So, 9 plus 16 equals 25. Square root that, and you get 5. So, the diagonal distance is 5 miles.