

follows from the fact that the cosine function is

-periodic, which means

. Roughly speaking, this is the same as saying that a point on a circle is the same as the point you get by completing a full revolution around the circle (i.e. add

to the original point's angle with respect to the horizontal axis).
If you make another complete revolution (so we're effectively adding

) we get the same result:

. This is true for any number of complete revolutions, so that this pattern holds for any even multiple of

added to the argument. Therefore

for any integer

.
Next, because

, it follows that

is also true for any integer

. So we have

The rest follows from considering either case and solving for

.
You have to write the problem you need help with.