$$4\cos^2\left(x+\frac{\pi}{4}\right)=3\Longleftrightarrow \cos\left(x+\frac{\pi}{4}\right)=\pm\frac{\sqrt 3}{2}$$
And from here:
$$(1)\ (\text{With }+)\;\;\;x+\frac{\pi}{4}=\pm\frac{\pi}{6}+2k\pi\Longrightarrow x=\left\\{\begin{array}-\;\;\;\;-\frac{\pi}{12}+2k\pi\\\\{}\\\\\;\;\;\;-\frac{5\pi}{12}+2k\pi\end{array}\right.\;\;\;,\,\,k\in\Bbb Z$$
$$(2)\ (\text{With }-)\;\;\;x+\frac{\pi}{4}=\pm\frac{5\pi}{6}+2k\pi\Longrightarrow x=\left\\{\begin{array}-\;\;\;\;\;\;\;\;\;\frac{7\pi}{12}+2k\pi\\\\{}\\\\\;\;\;\;-\frac{13\pi}{12}+2k\pi\end{array}\right.\;\;\;,\,\,k\in\Bbb Z$$
Now observe that the second option in (1) and the first one in (1) differ by $\,\pi\,$ (up to a multiple of $\,2\pi\,$ , of course), and the same goes for the first option in (1) and the second one in (2), and from here you get the answers as you wrote them (i.e., up to multiples of $\,\pi\,$)