$13 \cdot 29$ Given that $x_{1}, x_{2}$ are the two real roots of the equation $x^{2}-(k-2) x+\left(k^{2}+3 k+5\right)=0$ (where $k$ is a real number). The maximum value of $x_{1}{ }^{2}+x_{2}{ }^{2}$ is
(A) 19.
(B) 18.
(C) $5 \frac{5}{9}$.
(D) Does not exist.
(China High School Mathematics League, 1982)
[Solution] By Vieta's formulas, we have
$$
\begin{aligned}
x_{1}^{2}+x_{2}^{2} & =\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=(k-2)^{2}-2\left(k^{2}+3 k+5\right) \\
& =-(k+5)^{2}+19,
\end{aligned}
$$

Since the equation has two real roots, we have

i.e. $\square$
$$
\begin{array}{c}
\Delta=(k-2)^{2}-4\left(k^{2}+3 k+5\right) \geqslant 0, \\
3 k^{2}+16 k+16 \leqslant 0 . \quad \text { Thus } \quad-4 \leqslant k \leqslant-\frac{4}{3} .
\end{array}
$$

From the above, within this range, the value of $k$ that maximizes $x_{1}^{2}+x_{2}^{2}$ is $k=-4$, at which point
$$
x_{1}^{2}+x_{2}^{2}=18 \text {. }
$$

Therefore, the answer is $(B)$.