In the country of Nohills, each pair of cities is connected by a straight (and flat) road. The chart to the right shows the distances along the straight roads between some pairs of cities. The distance along the straight road between city $P$ and city $R$ is closest to
(A) 30
(B) 25
(C) 27
(D) 24.5
(E) 24

|  | $P$ | $Q$ | $R$ | $S$ |
| :---: | :---: | :---: | :---: | :---: |
| $P$ | 0 | 25 |  | 24 |
| $Q$ | 25 | 0 | 25 | 7 |
| $R$ |  | 25 | 0 | 18 |
| $S$ | 24 | 7 | 18 | 0 |
From the chart, we see that $Q R=25, Q S=7$ and $S R=18$.

Since $Q R=Q S+S R$ and $Q R$ is the largest of these three lengths, then $S$ must be a point on line segment $Q R$.

This gives the following configuration so far:

![](https://cdn.mathpix.com/cropped/2024_04_20_33a8a6559d675f59baa2g-140.jpg?height=71&width=417&top_left_y=2130&top_left_x=911)

We have not yet used the fact that $P Q=25$ or that $P S=24$.

Note that $7^{2}+24^{2}=49+576=625=25^{2}$, so $Q S^{2}+P S^{2}=P Q^{2}$.

Since these lengths satisfy this property, then the points $P, S$ and $Q$ form a triangle that is right-angled at $S$.

This gives the following configuration so far:

![](https://cdn.mathpix.com/cropped/2024_04_20_33a8a6559d675f59baa2g-141.jpg?height=388&width=437&top_left_y=153&top_left_x=890)

(We could have drawn $P$ "above" $Q R$.)

Since $\angle P S Q=90^{\circ}$, then $\angle P S R=90^{\circ}$.

Therefore, $P R^{2}=P S^{2}+S R^{2}=24^{2}+18^{2}=576+324=900$.

Since $P R>0$, then $P R=\sqrt{900}=30$.

Thus, the distance between cities $P$ and $R$ is 30 .

ANSWER: (A)