Completing the square of $x^2 - mx = 1$ is not giving me the right answer. This is my attempt
$$
\begin{align}
    x^2 - mx &= 1 \\
    x^2 - mx - 1 &= 0 \\
    \left(x^2 - mx + \frac{m^2}{4} - \frac{m^2}{4}\right) - 1 &= 0 \\
    \left(x^2 - mx + \frac{m^2}{4}\right) - \frac{m^2}{4} - 1 &= 0 \\
    \left(x^2 - mx + \frac{m^2}{4}\right) - \frac{m^2}{4} - \frac{4}{4} &= 0 \\
    \left(x^2 - mx + \frac{m^2}{4}\right) - \frac{m^2 - 4}{4} &= 0 \\
    \left(x^2 - mx + \frac{m^2}{4}\right) &= \frac{m^2 - 4}{4} \\
    \left(x - \frac{m}{2}\right)^2 &= \frac{m^2 - 4}{4} \\
    \sqrt{\left(x - \frac{m}{2}\right)^2} &= \sqrt{\frac{m^2 - 4}{4}} \\
    x - \frac{m}{2} &= \pm \frac{\sqrt{m^2 - 4}}{\sqrt{4}} \\
    x &= \frac{m}{2} \pm \frac{\sqrt{m^2 - 4}}{2} \\[20pt]
    x_1 &= \frac{m}{2} - \frac{\sqrt{m^2 - 4}}{2} \\
    x_1 &= \frac{m - \sqrt{m^2 - 4}}{2} \\[16pt]
    x_2 &= \frac{m}{2} + \frac{\sqrt{m^2 - 4}}{2} \\
    x_2 &= \frac{m + \sqrt{m^2 - 4}}{2} \\
\end{align}
$$
However, the correct answer according to the text is:
$$
\begin{align}
x_1 &= \frac{m}{2} - \frac{\sqrt{m^2 + 4}}{2} \\
x_2 &= \frac{m + \sqrt{m^2 + 4}}{2} \\
\end{align}
$$
Why $\sqrt{m^2 + 4}$ instead of $\sqrt{m^2 - 4}$ ???

(Not an answer, just a long comment.)
Your actual question has already been answered, but I want to point out another mistake, namely when you go from
$$\left(x - \frac{m}{2}\right)^2 = \frac{m^2 - 4}{4}$$
to
$$\sqrt{\left(x - \frac{m}{2}\right)^2} = \sqrt{\frac{m^2 - 4}{4}}.$$
At this point, there should be $\pm$ signs before the $\surd$ signs (it's redundant to put $\pm$ on both sides of the equation, but there needs to be a $\pm$ on at least one of them). You've added the $\pm$ signs in the next line, so it's not the end of the world, but conceptually it's important to understand where to put them.
Here's a simpler example: suppose we have $x^2=9$. Taking square roots, we have
$$x = \pm\sqrt9$$
so $x=\pm3$. Note that $\sqrt9$ in itself means only $3$, not $\pm 3$! It is not the $\surd$ sign, but rather the act of taking the square root, that engenders the $\pm$.
