5. Let real numbers $x, y$ satisfy:
$$
x^{3}=3 y^{2} x+5-\sqrt{7}, y^{3}=3 x^{2} y+5+\sqrt{7} \text {. }
$$

Then the value of $x^{2}+y^{2}$ is ( ).
(A) $25-8 \sqrt{7}$
(B) $2 \sqrt{7}$
(C) $12 \sqrt{7}-25$
(D) 4
5. D.

Rearranging terms, we get
$$
x^{3}-3 x y^{2}=5-\sqrt{7}, \quad y^{3}-3 x^{2} y=5+\sqrt{7} \text {. }
$$

Squaring and adding the above two equations, and simplifying, we get
$$
\begin{array}{l}
x^{6}+3 x^{4} y^{2}+3 x^{2} y^{4}+y^{6}=64 \\
\Rightarrow\left(x^{2}+y^{2}\right)^{3}=64 \Rightarrow x^{2}+y^{2}=4 .
\end{array}
$$