We have, x2+y2=25,xy=12 ⇒x2+(x12)2=25 ⇒x4−25x2+144=0 ⇒x4−16x2−9x2+144=0 ⇒(x2−16)(x2−9)=0 ⇒x=±4 and x=±3
Alternate Solution:
We have, x2+y2=25 and xy=12
Now, x2+y2+2xy=25+2(12) ⇒(x+y)2=49 ⇒x+y=±7…(i)
and x2+y2−2xy=25−2(12) ⇒(x−y)2=1 ⇒x−y=±1
On solving Eqs. (i) and (ii), we get x=±4 and x=±3