If he travels 5 blocks south and 3 blocks west, the distance from his house considered along with the distances travelled gives a right angled triangle whose opposite side and adjacent sides are the distances travelled north and west.
The distance from his house after moving 3 blocks west is the hypotenuse side. As such, the distance may be computed using Pythagoras' theorem. Let the distance from his house be G