The first part of the question asked you to show that $\theta = 0, 2\pi/7, 4\pi/7, 6\pi/7$ when $\cos(4\theta) = \cos(3\theta)$. By using $\cos(\theta) = \frac{1}{2} \left(z + \frac{1}{z} \right)$, I have managed to show that $$(z - 1)\left(z^3 - \frac{1}{z^4} \right) = 0$$ which gives you the seventh roots of unity. It is showing that those cosines are roots of the equation that I'm stuck on. The textbook has done similar problems, but those are conveniently much easier.
First, I tried expanding $$\cos(4\theta) = 8\cos^4(\theta) - 8\cos^2(\theta) + 1$$ and $$\cos(3\theta) = 4\cos^3(\theta) - 3\cos(\theta)$$ as powers of cosine, but am unable to get the cubic equation above (by substituting $x = \cos(\theta)$). (Those cosines of multiples of $2\pi/7$are indeed roots of the cubic, I checked them.)
Next, I attempted to brute-force the cubic by expanding $(x - \cos(2\pi/7))(x - \cos(4\pi/7))(x - \cos(6\pi/7))$, giving you $$x^3 - \left(\cos\left(\frac{2\pi}{7}\right) + \cos\left(\frac{4\pi}{7}\right) + \cos\left(\frac{6\pi}{7}\right)\right)x^2 + \left(\cos\left(\frac{2\pi}{7}\right)\cos\left(\frac{4\pi}{7}\right) + \cos\left(\frac{2\pi}{7}\right)\cos\left(\frac{6\pi}{7}\right) + \cos\left(\frac{4\pi}{7}\right)\cos\left(\frac{6\pi}{7}\right)\right)x - \left(\cos\left(\frac{2\pi}{7}\right)\cos\left(\frac{4\pi}{7}\right)\cos\left(\frac{6\pi}{7}\right)\right).$$ The coefficient of $x^2$ equals $-0.5$, but again, the values of the coefficient of $x$ and the constant term evade me (not allowed to use decimals).
How could I find their values? Or is there another, simpler way of solving the question?