The Fourier transforms are all linear transforms, if the given function is a sum you can treat each addens separately, if the given function contains constant factors you can keep them out of the calculation and multiply them back in the result.
Obviously the Fourier series of the constant $1$ is the constant $1$, i.e., all coefficients except the constant one are zero.
For $x^2$ the Fourier coefficients for the symmetric fundamental perion $[-L,L]$ with basis functions $e^{i\frac\pi L kx}$ are
\begin{align}
c_K=\frac1{2L}\int_{-L}^Lx^2\,e^{-i\frac\pi L kx}\,dx
=\frac{L^2}2\int_{-1}^1 x^2\,e^{-i\pi kx}\,dx\\
\end{align}
which can be solved using partial integration reducing the degree of the factor $x^2$.