LaTeX code:
\begin{aligned}
(a + b)^2 &= (a + b)(a + b) \\
&= a^2 + ab + ba + b^2 \\
&= a^2 + 2ab + b^2
\end{aligned}
Rendered (should have empty cells before = signs in rows 2 and 3):
Each row should have:
(a + b)^2, Right cell: = (a + b)(a + b)= a^2 + ab + ba + b^2= a^2 + 2ab + b^2The equals signs should all line up vertically on the left side of the right column.