Question 142017
We use pythagorean theorem.
7miles south of town A to B will be your vertical line ------ mark "a"
5miles east of town A to B will be your horizontal line ------- mark "b"
Distance from town A to B will be the diagonal line  ---------- mark "c" 
So,
c^2 = a^2 + b^2
C^2 = 5^2  + 7^2
c^2 =  74
c= sq rt 74
c=8.6 miles

*note: it's true that going east is horizontal and going south is vertical.
North to South is vertical line, and west to East is horizontal line.
Thank you,
Jojo