<s>[INST] For all real $x, y$ that satisfy $x^3+y^3=7$ and $x^2+y^2+x+y+xy=4$ I started with $x+y=a$ and $xy=b$ and I rewrote the equations with a and b.
I got
$$b=a^2+a-4$$
$$x^3+y^3=2a^3+3a^2-12a^2=7$$
$$f(a)=-2a^3+3a^2-12a^2-7=0$$
I factorised it to get
$$f(a)=-(a-1)(a-1)(2a+7)=0$$
So $a=1,b=-2$ or $a=\frac{-7}{2},b=\frac{19}{4}$
Now I know that values of a and b but how do I get x and y?
Note:
The textbook solution says that if we consider a=1 and b=-2 then x and y are the roots of
$$t^2+t-2=0$$
But shouldn't it be
$$t^2-t-2=0$$
from Vieta's formulas?
I would like a clarification for this or any other solutions would be fine too.
 [/INST] Let $t^2+u t+v$ be a quadratic polynomial with roots $a$ and $b$. Then
$$t^2+u t+v=(t-a)(t-b)=t^2-(a+b)t+ab,$$
and hence $v=ab$ and $a=-(a+b)$. Note the $-$-sign. In you particular case with $a=1$ and $b=-2$
$$u=-(a+b)=1\qquad\text{ and }\qquad v=ab=-2,$$
corresponding to the polynomial $t^2+t-2$.
</s>