Question 825764
<pre>
Up is due north, right is due east. The black
lines show his path from point A to point B.
The green line AB shows the shortest distance
from point A to point B.

{{{drawing(400,6800/21,-5,37,-5,29,
line(0,0,0,9),line(0,9,32,9),line(32,9,32,24),
green(line(0,0,32,24)),locate(-3,4.6,9km),locate(15,9,32km),
locate(32.2,16.5,15km),locate(0,0,A),locate(32,26,B)
 )}}} 

Draw in the following red lines:

{{{drawing(400,6800/21,-5,37,-5,29,
line(0,0,0,9),line(0,9,32,9),line(32,9,32,24),
green(line(0,0,32,24),locate(13,14,40km)),locate(-3,4.6,9km),locate(15,9,32km),
locate(32.2,16.5,15km),locate(0,0,A),locate(32,26,B),
red(line(0,0,32,0),line(32,0,32,9),locate(15,0,32km),locate(32.3,4.6,9km),
locate(32,0,C)) )}}}

The shortest distance, AB, is the hypotenuse of right triangle ABC.
By the Pythagorean theorem,

ABē = ACē + CBē, and CB = 9km + 15km = 24km
ABē = 32ē + 24ē
ABē = 1024 + 576
ABē = 1600
 AB = &#8730;<span style="text-decoration: overline">1600</span>  
 AB = 40km

Edwin</pre>