In the diagram, the shape consists of seven identical cubes with edge length 1. Entire faces of the cubes are attached to one another, as shown. What is the distance between $P$ and $Q$ ?
(A) $\sqrt{20}$
(B) $\sqrt{26}$
(C) $\sqrt{14}$
(D) $\sqrt{18}$
(E) $\sqrt{30}$

![](https://cdn.mathpix.com/cropped/2024_04_20_e85ef69091c57cb633f3g-059.jpg?height=501&width=566&top_left_y=476&top_left_x=1170)
Suppose that $R$ is the point at the bottom of the solid directly under $Q$ and $S$ is the back left bottom corner of the solid (unseen in the problem's diagram).

Since $Q R$ is perpendicular to the bottom surface of the solid, then $\triangle P R Q$ is right-angled at $R$ and so $P Q^{2}=P R^{2}+R Q^{2}$.

We note also that $\triangle P S R$ is right-angled at $S$, since the solid is made up of cubes.

Therefore, $P R^{2}=P S^{2}+S R^{2}$.
![](https://cdn.mathpix.com/cropped/2024_04_20_688a3b42f69739f2e244g-116.jpg?height=506&width=1236&top_left_y=500&top_left_x=495)

This tells us that $P Q^{2}=P S^{2}+S R^{2}+R Q^{2}$.

Since the edge length of each cube in the diagram is 1 , then $P S=1, S R=4$, and $R Q=3$.

Therefore, $P Q^{2}=1^{2}+4^{2}+3^{2}=26$.

Since $P Q>0$, then $P Q=\sqrt{26}$.

ANSWER: (B)