Subtract 2 from both sides:
[tex]x^2+2x=-2[/tex]Group terms together on the left hand side with a placeholder constant:
[tex](x^2+2x+_-)=_--2[/tex]Take one half of the coefficient of x and square it, then add it to both sides:
[tex]\begin{gathered} (\frac{2}{2})^2=1 \\ x^2+2x+1=1-2 \\ x^2+2x+1=-1 \\ \text{where:} \\ x^2+2x+1=(x+1)^2 \\ \text{therefore:} \\ (x+1)^2=-1 \end{gathered}[/tex]