Use the aligned environment to type a multi-line equation.
The equation begins with \begin{aligned} and ends with \end{aligned}.
The end of each line in this environment should have a double slash \\ - except for the final line.
Start by typing the following:
\begin{aligned} 2 x + 2 = x - 6 \end{aligned}
Then copy and paste the following, and compare the result when you select \LaTeX:
\begin{aligned} 2 x + 2 &= x - 6 \\ 2x + 2 - x &= x - 6 - x \end{aligned}
Note that you must type &= when you would normally type =, in order for the vertical alignment to be preserved.