In the attached figure we can see the two segments the man drove, where the is the distance of a road that goes from the man's home directly to his work.
It should be noted that is also the hypotenuse of the righ triangle formed. Hence, we can use the Pithagorean theorem to find this distance: