5. As shown in Figure 1, two circles are concentric, with radii of $2 \sqrt{6}$ and $4 \sqrt{3}$, respectively. The sides $A B$ and $C D$ of rectangle $A B C D$ are chords of the two circles. When the area of the rectangle is maximized, its perimeter is equal to ( ).
(A) $22+6 \sqrt{2}$
(B) $20+8 \sqrt{2}$
(C) $18+10 \sqrt{2}$
(D) $16+12 \sqrt{2}$
5. (D).

As shown in Figure 4, connect $O A$, $O B$, $O C$, $O D$, draw $O E \perp A D$, and extend $E O$ to intersect $B C$ at $F$. Clearly, $O F \perp B C$. It is easy to see that
$$
\triangle O A D \cong \triangle O B C \text {, and } S_{\text {rhombus } A B C D}=4 S_{\triangle O A D} \text {. }
$$

When $S_{\text {rhombus } A B C D}$ reaches its maximum value, $S_{\triangle O A D}$ must also reach its maximum value. At this point, $O A \perp O D$, which implies
$$
A D=\sqrt{(2 \sqrt{6})^{2}+(4 \sqrt{3})^{2}}=6 \sqrt{2} \text {. }
$$

It is easy to see that $A B=O E+O F=2 O E$
$$
=2 \times \frac{2 \sqrt{6} \times 4 \sqrt{3}}{6 \sqrt{2}}=8 \text {. }
$$
$$
\begin{aligned}
\therefore A B+B C+C D+D A & =2(8+6 \sqrt{2}) \\
& =16+12 \sqrt{2} .
\end{aligned}
$$