Fourier series of $cos(\omega_0 t)$ in continuous time
They did not actually solve the integral, they just used a version of Euler's formula:

$$\cos(\omega_0t)=\frac12\left(e^{j\omega_0t}+e^{-j\omega_0t}\right)$$

which already is the Fourier series of $\cos(\omega_0t)$. Comparing $(1)$ to the formula for the Fourier series, you see that all coefficients are zero except for the ones with indices $k=1$ and $k=-1$, and they equal $\frac12$.