First rearrange the equation as cosx= -2x/(2n+1)π+ 1. Now consider any value of n, say, n=2 and then just draw graphs of y=cosx and y= -2x/(2n+1)π +1. You'll observe there are 5 intersection points,i.e., 2n+1 solutions
Such questions can only be solved by drawing graphs.
Hope it helps!!