6. As shown in Figure 3, a circle with diameter $P Q=2 r(r \in \mathbf{Q})$ is tangent to a circle with radius $R(R \in \mathbf{Q})$ at point $P$. The vertices $A$ and $B$ of square $A B C D$ lie on the larger circle, and the smaller circle is outside the square and tangent to side $C D$ at point $Q$. If the side length of the square is a rational number, then the possible values of $R$ and $r$ are ( ).
(A) $R=5, r=2$
(B) $R=4, r=\frac{3}{2}$
(C) $R=4, r=2$
(D) $R=5, r=\frac{3}{2}$
6.D.

Auxiliary lines as shown in Figure 4.
From the problem, we know
$$
O A^{2}=O E^{2}+A E^{2} \text {. }
$$

Let $A B=2 x$, then
$$
A E=x \text {. }
$$

Thus, $R^{2}=[2 x-(R-2 r)]^{2}+x^{2}$.
Simplifying, we get
$$
5 x^{2}-4(R-2 r) x+4\left(r^{2}-R r\right)=0 \text {. }
$$

For $A B$ to be a rational number, it is sufficient that $x$ is a rational number, which means the discriminant of equation (1)
$$
\begin{array}{l}
\Delta=[-4(R-2 r)]^{2}-4 \times 5 \times 4\left(r^{2}-R r\right) \\
=16\left(R^{2}+R r-r^{2}\right)
\end{array}
$$

must be a perfect square, which means $R^{2}+R r-r^{2}$ must be a perfect square.
Upon verification, only option (D) meets the requirement.