<s>[INST] How to solve these equations for x and y.. equations are 

$(x-y)(x+2y)(2x+y) = 20$ 

and

$x^2+xy+y^2 = 7$

i want the METHOD not the solutions 
 [/INST] Equation 2 is the equation of an ellipse. Basically, any equation
\begin{eqnarray}
Ax^2 + Bxy + Cy^2 + Dx + Ey + C = 0
\end{eqnarray}
can be translated, by a change of variable, into:
\begin{eqnarray}
\left(\frac{\tilde{x}}{a}\right)^2 + \left(\frac{\tilde{y}}{b}\right)^2 = 1
\end{eqnarray}
Leading to:
\begin{eqnarray}
\tilde{x} & = & a\cos(\theta) \\
\tilde{y} & = & b\sin(\theta) \\
\tilde{y} & = & b\sqrt{1 - \frac{\tilde{x}^2}{a^2}}
\end{eqnarray}
Now, for the transformation from $(x, y)$ to $(\tilde{x}, \tilde{y})$, we need to find the rotation angle $\Theta$ and translation $(0,0) \mapsto (x_c, y_c)$ so that the ellipse is centered on $0$ and its minor and major axis are aligned with the axis of our base. Back to the generic equation of an ellipse:
\begin{eqnarray}
A & = & a^2 \sin(\Theta)^2 + b^2 \cos(\Theta)^2 \\
B & = & 2(b^2 - a^2)\sin(\Theta)\cos(\Theta) \\
C & = & a^2 \cos(\Theta)^2 + b^2 \sin(\Theta)^2 \\
D & = & -2Ax_c - By_c \\
E & = & -Bx_c - 2 Cy_c \\
F & = & Ax_c^2 + Bx_cy_c + Cy_c^2 - a^2b^2 \\
\end{eqnarray}
With $D$ and $E$, you can find $(x_c, y_c)$. Here, there are no term $D$ or $E$, because your ellipse is already centered on $0$. $A+C = a^2 + b^2$ and $F = a^2b^2$, so you deduce $a$ and $b$. Then $B= (b^2-a^2)sin(2\Theta)$, and you find $\theta$. So 
\begin{eqnarray}
\tilde{x} & = & x\cos(\Theta) - y\sin(\theta) \\
\tilde{y} & = & x\sin(\Theta) + y\cos(\theta)
\end{eqnarray}
</s>