Sketch and use coordinates
Treat the starting point as (0, 0), with east as positive x and north as positive y. Each move changes one coordinate. The final distance from the start is then a straight-line distance.
Worked example
A person walks 5 km north, then 3 km east, then 5 km south. North and south cancel, so the person ends 3 km east of the start.
Right-angle triangles
When the path forms a right angle, such as 3 km east and 4 km north, the shortest distance is 5 km by the Pythagorean theorem. Learn the common triples (3-4-5, 5-12-13, 8-15-17).
Related practice: blood relations and coding-decoding. See the use in railway reasoning.