Start like this: $$ (f_n(x))^2 = \left(\sum_{k=1}^n \frac1{\sqrt n}\cos\frac{\pi k}n \cos kx\right) \left(\sum_{l=1}^n \frac1{\sqrt n}\cos\frac{\pi l}n \cos lx\right) = \sum_{k,l = 1}^n \frac1n\cos\frac{\pi k}n \cos\frac{\pi l}n \cos kx\cos lx.$$ Now you want to integrate that from $0$ to $2\pi$. But $$\int_0^{2\pi}\!\!\!\cos kx\cos lx\,dx = 0$$ when $l\ne k$. So you can disregard all the terms where $l\ne k$, and all that is left is the sum over the "diagonal" terms. Therefore $$ \int_0^{2\pi}\!\!\! (f_n(x))^2 = \sum_{k=1}^n \frac1n\cos^2\frac{\pi k}n\int_0^{2\pi} \!\!\!\cos^2kx\,dx.$$ Next, $$\int_0^{2\pi}\!\!\!\cos^2kx\,dx = \pi$$, so the sum reduces to $$\int_0^{2\pi}\!\!\! (f_n(x))^2 = \sum_{k=1}^n \frac\pi n\cos^2\frac{\pi k}n$$.
I'll leave you to evaluate the limit of that sum as $n\to\infty$. Hint: think of it as the Riemann approximation to a certain integral.