Problem 3. (Option 2)

Find the sum of the squares of the roots of the equation $\left(x^{2}+6 x\right)^{2}-1580\left(x^{2}+6 x\right)+1581=0$.
Solution: Let's make the substitution: $x^{2}+6 x+9=t$, then $x^{2}+6 x=t-9$ and the equation will take the form:

$$
\begin{aligned}
& (t-9)^{2}-1580(t-9)+1581=0 \\
& t^{2}-1598 t+15882=0
\end{aligned}
$$

The discriminant of the equation is greater than zero, so the equation has two roots. By Vieta's theorem, $t_{1}+t_{2}=1598, t_{1} \cdot t_{2}=15882$, which means both roots of the quadratic equation are positive. Let's make the reverse substitution:

$$
\begin{array}{cc}
(x+3)^{2}=t_{1} & (x+3)^{2}=t_{2} \\
x+3= \pm \sqrt{t_{1}} & x+3= \pm \sqrt{t_{2}} \\
x_{1,2}=-3 \pm \sqrt{t_{1}} & x_{3,4}=-3 \pm \sqrt{t_{2}} \\
x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}=\left(-3+\sqrt{t_{1}}\right)^{2}+\left(-3-\sqrt{t_{1}}\right)^{2}+\left(-3+\sqrt{t_{2}}\right)^{2}+\left(-3+\sqrt{t_{2}}\right)^{2}= \\
=2\left(9+t_{1}\right)+2\left(9+t_{2}\right)=36+2\left(t_{1}+t_{2}\right)=36+2 \cdot 1598=3232
\end{array}
$$

Answer: 3232.