CPhil is probably going to give you the proper answer so I'll chime in with a method that's probably
above where you're currently at but is one of the more clever tricks in the toolbox
.\(\cos(5\theta)= Re(e^{i5\theta}) = \\ Re((e^{i\theta})^5) = Re((\cos(\theta)+i\sin(\theta))^5)\\ \text{Now apply the binomial expansion}\\ Re\left(\sum \limits_{k=0}^5\dbinom{5}{k}\cos^k(\theta)(i\sin(\theta))^{5-k}\right)\)
\(\text{We can see the only terms that are real will be }k=1,3,5\\ \text{and we end up with}\\ \cos(5\theta) = \cos^5(\theta)-10\cos^3(\theta)\sin^2(\theta)+5\cos(\theta)\sin^4(\theta)\)
\(\text{Oh, I see you need it entirely in }\cos(\theta)\text{. Well we just do this}\\ \cos(5\theta) = \cos^5(\theta)-10\cos^3(\theta)(1-\cos^2(\theta))+ 5\cos(\theta)(1-\cos^2(\theta))^2\)
You can do the final simplification.
.