Solving $3x^2 - 4x -2 = 0$ by completing the square
Try going backward; expand the square $(x-\tfrac{2}{3})^2$ to find that $$\left(x-\frac{2}{3}\right)^2=\left(x-\frac{2}{3}\right)\left(x-\frac{2}{3}\right)=x^2-\frac43x+\frac49.$$
Well, $(x-a)^2=(x-a)(x-a)=x^2-2ax+a^2$ with $a=\frac{2}{3}$ gives the last line.