x^2 -2x+5=0

Since x1 and x2 are solutions to the equation:

==> x1^2 -2x1 +5 =0.....(1)

and x2^2 -2x^2+5 =0 ....(2)

We will add (1) and (2) :

x1^2 -2x1+5 + x2^2 -2x2 +5 =0

Rearrange:

x1^2+ x2^2 = 2(x1+x2) -10

But according Viete's rule x1+x2 = -b/a = 2

==> x1^2 +x2^2 = 2(2)-10 = -6