A picture helps.
North means positive in the y direction, South is negative in the y direction, East is positive in the x direction and West is negative in the x direction.
So total x is 5-3=2 and total y is 3-7=-4.
So from the starting point S(0,0) we end up at (2,-4).
The straight line difference uses Pythagoras’ Theorem:
√(2²+(-4)²)=√(4+16)=√20=√(4×5)=2√5=4.4721 blocks approx.
Note that it’s 4+2=6 if you follow the dotted path (south 4 blocks and east 2 blocks), which is not the straight line distance shown by the solid red line.