[tex](x^2+2x)^2-5(x^2+2x)+4=0\\
Notam\ x^2+2x=t\\
t^2-5t+4=0\\
t^2-4t-t+4=0\\
t(t-4)-(t-4)=0\\
(t-4)(t-1)=0 \Rightarrow t_1=4,t_2=1\\
Luam\ ambele\ cazuri\ posibile:\\
x^2+2x=4\\
x^2+2x-4=0\\
a=1,b=2,c=-4\\
x_1\cdot x_2=-4\\
x_1+x_2=-2 |()^2\\
(x_1+x_2)^2=4\\
x_{1}^2+x_{2}^2+2x_1\cdot x_2=4\\
x_{1}^2+x_{2}^2-8=4\\
x_{1}^2+x_{2}^2=\boxed{12}\\
Luam\ si\ al\ doilea\ caz:\\
x^2+2x=1\\
x^2+2x-1=0\\
a=1,b=2,c=-1\\
x_3\cdot x_4=-1\\
x_3+x_4=-2|()^2\\
(x_3+x_4)^2=4\\
[/tex]
[tex]x_{3}^2+x_{4}^2+2x_3\cdot x_4=4\\
x_{3}^2+x_{4}^2-2=4\\
x_{3}^2+x_{4}^2=\boxed{6}\\
x_{1}^2+x_{2}^2+x_{3}^2+x_{4}^2=6+12=\boxed{\boxed{18}}\\q.e.d[/tex]