3. Let the function be
$$
\begin{array}{l}
f(x, y) \\
=\sqrt{x^{2}+y^{2}-6 y+9}+\sqrt{x^{2}+y^{2}+2 \sqrt{3} x+3}+ \\
\quad \sqrt{x^{2}+y^{2}-2 \sqrt{3} x+3} .
\end{array}
$$

Then the minimum value of $f(x, y)$ is ( ).
3. C.

Let $A(0,3), B(-\sqrt{3}, 0), C(\sqrt{3}, 0)$, $D(0,1), P(x, y)$.
Then $f(x, y)=|P A|+|P B|+|P C|$.
Notice that,
$$
\angle A D B=\angle B D C=\angle C D A=120^{\circ} \text {. }
$$

Thus, $D$ is the Fermat point of $\triangle A B C$.
Therefore, the minimum value of $f(x, y)$ is achieved when point $P$ is $D$, and the minimum value is
$$
|D A|+|D B|+|D C|=6 \text {. }
$$