Since the North and the East directions are perpendicular
Then we will have a right triangle has two legs, North and east
Its hypotenuse is the straight distance between the 2 houses
By using the Pythagoras Theorem

Since leg1 = 12 km
Since leg2 = 16 km
Substitute them in the rule above

Take square root for both sides

The distance between the parents' and grandparents" houses is 20 KM