2nd solution of $\cos x \cos 2x\cos 3x= \frac 1 4 $ 
$\cos x \cos 2x\cos 3x= \dfrac 1 4 $

Attempt explained:
$(2\cos x \cos 3x)\cos 2x = \frac1 2 $
$(\cos 4x +\cos 2x )\cos 2x = \frac 1 2 \\\cos ^2y + \cos y (2\cos^2y- 1)= \frac1 2 \\ $
(Let, y = 2x)
$\implies 4\cos^3 y+2\cos^2y- 2\cos y-1=0$
I solved this equation using Rational Root Theorem and got $y = \frac 1 2$
$\implies x= m\pi \pm \dfrac\pi3 \forall x\in \mathbb {Z}$
Using Remainder theorem, the other solution is $\cos^2 y = \dfrac 1 2 $
$\implies x = \dfrac n2\pi \pm\dfrac \pi 8 $
But answer key states: $ x= m\pi \pm \dfrac\pi3or x =(2n+1)\dfrac \pi 8$
Why don't I get the second solution correct?

Remember that a cubic equation can have up to three real solutions. You did find that $\cos y = -\dfrac{1}{2}$ is one of the solutions, but you still need to find the other two.
Since $\cos y = -\dfrac{1}{2}$ is a root of $4\cos^3 y+2\cos^2y- 2\cos y-1=0$, we can factor the equation as:
\begin{align*}
4\cos^3 y+2\cos^2y- 2\cos y-1 &= 0
\\
(2\cos y + 1)(2\cos^2 y - 1) &= 0
\\
(2\cos y + 1)(\sqrt{2}\cos y + 1)(\sqrt{2}\cos y - 1) &= 0
\end{align*}
So the solutions are $$\cos y = -\dfrac{1}{2}, -\dfrac{1}{\sqrt{2}}, \dfrac{1}{\sqrt{2}}$$
Now, solve these for $y$, and then divide by $2$ to get $x$. 
