Apply the formula
cos(a) + cos(b) = 2cos((a+b)/2)cos((a-b)/2)
to the sum cos(x) + cos(5x)
This gives you new equation
-cos(2x) + 2cos(3x)cos(2x) = 0
cos(2x)(2cos(3x) - 1) = 0
This product is 0 iff at least one of the factors is 0.
Case 1:
cos(2x) = 0
2x = π/2 + kπ for any integer k
x = π/4 + kπ/2 for any integer k
Case 2:
2cos(3x) - 1 = 0
cos(3x) = 1/2
3x = π/3 + 2kπ for any integer k
or
3x = -π/3 + 2kπ for any integer k
So in conclusion there are an infinity of solutions falling into three form:
x = π/4 + kπ/2 for any integer k
x = π/9 + 2kπ/3 for any integer k
x = -π/9 + 2kπ/3 for any integer k