5. As shown in Figure 1, Doug built a square window, inlaid with eight rectangular glass panes of equal size, with the length to width ratio of each pane being $5: 2$. It is known that each glass pane has a 2-inch border around it. Then the side length of the square window is ( ).
(A) 26
(B) 28
(C) 30
(D) 32
(E) 34
5. A.

Let the length of the glass be $5 x$, and the width be $2 x$. Then
$$
\begin{array}{l}
5 x+5 x+2 \times 3=2 x+2 x+2 x+2 x+2 \times 5 \\
\Rightarrow x=2 .
\end{array}
$$

Therefore, the side length of the square window is $5 \times 2 \times 2+2 \times 3=26$.