The problem to solve is to find the values of $x$ with which the function $\sin(x)+\cos(x)$ will compute to its highest value. I checked the textbook's answers section: it has the function transformed to
$$\sqrt{2}\cos(x-\frac{\pi}{4})$$
Up to that point, it was all clear to me. But then the solution says,
This function will have the highest value with $\cos(x-\frac{\pi}{4}) = 1$ , that is, with $x-\frac{\pi}{4}=\frac{\pi}{2}+k\pi$, or with $x=\frac{3\pi}{4}+k\pi$, which means that $x=\pi-\frac{3\pi}{4}+(k-1)\pi$, or, finally, $x=\frac{\pi}{4}+n\pi$, with $n$ being a natural number of any value.
But why the argument $x-\frac{\pi}{4}$ should equal $\frac{\pi}{2}+k\pi$? Isn't the cosine maximal at zero? And isn't its period $2k\pi$? Shouldn't it be
The highest value of $\cos(x-\frac{\pi}{4})$ is 1, that is, with $x-\frac{\pi}{4}=2k\pi$
P.S. The textbook's answer ends with
The highest value of $\sin(x)+\cos(x)$ is $\sqrt{2}$.
.. so it's not "magnitude" I guess.
Here's the textbook's solution for this problem in full:
(Saveliy Tumanov, Basic Algebra, 1962)