Originally Posted by
Detanon I dont get how you get (x+y)(x-y).
It is the difference of two squares.
Difference of two squares - Wikipedia, the free encyclopedia
From the difference of two squares we see that $\displaystyle x^2-y^2=(x+y)(x-y)$
If you expand the right hand side using FOIL the LHS is obtained: $\displaystyle (x+y)(x-y) = x^2-xy+xy-y^2$
Since $\displaystyle -xy+xy=0$ we get $\displaystyle (x+y)(x-y)=x^2-y^2$
============================
EDIT: If you prefer you can use the substitution method
$\displaystyle x = 7-y$
$\displaystyle (7-y)^2-y^2=21$
and solve that linear equation (y^2 cancels) but I think using the difference of two squares is easier