We have

cos(2pi/7) +cos(4pi/7) + cos(8pi/7) = -1/2

The best way to prove this will be to simplify the left side. To do that we need to be able to try and collect like terms.

There is a trigonometric identity that says:

sin(x)cos(y) = (1/2)[(sin(x+y)+sin(x-y)]

Let's multiply both sides of the equation by sin(pi/7):

sin(pi/7)cos(2pi/7) + sin(pi/7)cos(4pi/7) + sin(pi/7)cos(6pi/7) = -1/2

Now, we apply the identity above:

(1/2)[sin(pi/7+2pi/7) + sin(pi/7-2pi/7)] + (1/2)[sin(pi/7+4pi/7) + sin(pi/7-4pi/7)]

+ (1/2)[sin(pi/7+8pi/7) + sin(pi/7-8pi/7)] = -(1/2)sin(pi/7)

We can multiply both sides by 2 and simplify the terms a bit:

[sin(3pi/7) + sin(-pi/7)] + [sin(5pi/7) + sin(-3pi/7)] + [sin(9pi/7) + sin(-7pi/7)] = -sin(pi/7)

Further simplifying:

sin(3pi/7) - sin(pi/7) + sin(5pi/7) - sin(3pi/7) + sin(9pi/7) - sin(7pi/7) = -sin(pi/7)

Now, we can collect like terms:

sin(5pi/7) + sin(9pi/7) - sin(7pi/7) = 0

But sin(7pi/7) = 0:

sin(5pi/7) + sin(9pi/7) = 0

At this point you can probably inference whether the identity will be proved, or not.

By the way, was the problem stated/copied correctly? I find myself wondering of the last term of the left half of the equation should be cos(6pi/7), not cos(8pi/7).

Hope this helps!