Let the town courthouse be the origin of coordinate plane, the positive direction of x-axis is west and negative direction is east, the positive direction of y-axis is north and negative direction is south. Then a lawyer home has coordinates (-2,3) and lawyer office has coordinates (5, -21).
Use the distance formula [tex]d= \sqrt{(x_1-x_2)^2+(y_1-y_2)^2} [/tex] to get the distance between lawyer's home and office:
[tex]d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}=\sqrt{(-2-5)^2+(3-(-21))^2}=[/tex]
[tex]=\sqrt{7^2+24^2} = \sqrt{49+576} = \sqrt{625} =25[/tex].
Answer: 25 miles.