<s>[INST] Solving $3x^2 - 4x -2 = 0$ by completing the square I can't understand the solution from the textbook (Stroud & Booth's "Engineering Mathematics" on a problem that involves solving a quadratic equation by completing the square.
The equation is this:
$$
\begin{align}
3x^2 - 4x -2 = 0 \\
3x^2 - 4x = 2
\end{align}
$$
Now, divide both sides by three:
$$x^2 - \frac{4}{3}x = \frac{2}{3}$$
Next, the authors add to both sides the square of the coefficient of $x$, completing the square on the LHS:
$$x^2 - \frac{4}{3}x + \left(\frac{2}{3}\right)^2 = \frac{2}{3} + \left(\frac{2}{3}\right)^2$$
Now, the next two steps (especially the second step) baffle me. I understand the right-hand side of the first quation (how they get the value of $\frac{10}{9}$), but the last step is a complete mystery to me:
$$
\begin{align}
x^2 - \frac{4}{3}x + \frac{4}{9} = \frac{10}{9} \\
\left(x - \frac{2}{3}\right)^2 = \frac{10}{9}
\end{align}
$$
Can anyone please explain how they went from the first step to the second step?
 [/INST] Well, $(x-a)^2=(x-a)(x-a)=x^2-2ax+a^2$ with $a=\frac{2}{3}$ gives the last line.
</s>