Let x be the distance the two friends must drive straight home from the beach. Draw the situation which is a right triangle as shown:

The required distance is the hypotenuse so by using the Pythagorean Theorem, we write:

\(\displaystyle{872}+{1162}={x}^{{2}}\)

\(\displaystyle{21025}={x}^{{2}}\)

\(\displaystyle\sqrt{21025}={x}\)

\(x=145\) miles