You're off on a small but important point. What Rudin is referring to as $c_n$ is indeed
$$
c_n = \frac{1}{2\pi}\int_{-\pi}^\pi f(t)e^{-int}~dt,
$$
and with this definition we have
$$
f(x) \sim \sum_{n=-\infty}^\infty c_ne^{inx}.
$$
However, this definition of the Fourier coefficients depends on which particular inner product you use, and at this point Rudin is using one that isn't what you're thinking of. Typically when one refers to the square-integrable functions on $[-\pi,\pi]$, the inner product of choice is
$$
\langle f,g\rangle = \int_{-\pi}^\pi f(t)\overline{g(t)}~dt.
$$
Then the definition
$$
\tilde{c}_n = \frac{1}{\sqrt{2\pi}}\int_{-\pi}^\pi f(t)e^{-int}~dt
$$
and the series expression
$$
f(x) \sim \sum_{n=-\infty}^\infty \tilde{c}_n\phi_n(x)
$$
where $\phi_n(x) = e^{inx}/\sqrt{2\pi}$ is more appropriate, because the $\phi_n$ are orthonormal in this inner product. Then defining $\tilde{\gamma}_n$ similarly, Parseval reads
$$
\int_{-\pi}^\pi f(t)\tilde{g(t)}~dt = \sum_{n=-\infty}^\infty \tilde{c}_n\overline{\tilde{\gamma}_n},
$$
$$
\int_{-\pi}^\pi |f(t)|^2~dt = \sum_{n=-\infty}^\infty |\tilde{c}_n|^2.
$$
In particular notice how the factors of $1/2\pi$ are not there compared to Rudin's formulas.
Where did they go? Well, since Rudin wants a Fourier series expansion in the form
$$
f(x) \sim \sum_{n=-\infty}^\infty c_ne^{inx},
$$
if he wants his version of Parseval to work then he needs to choose an inner product so that $\{e^{inx}\}$ is orthonormal. The way to do this is to define
$$
(f,g) = \frac{1}{2\pi}\int_{-\pi}^\pi f(t)\overline{g(t)}~dt.
$$
In this setting, the $c_n$ are indeed the Fourier coefficients with respect to the (now) orthonormal basis $\{e^{inx}\}$ and the inner product $(\cdot,\cdot)$. And Parseval reads
$$
\frac{1}{2\pi}\int_{-\pi}^\pi f(t)\overline{g(t)}~dt = \sum_{n=-\infty}^\infty c_n\overline{\gamma}_n,
$$
$$
\frac{1}{2\pi}\int_{-\pi}^\pi |f(t)|^2~dt = \sum_{n=-\infty}^\infty |c_n|^2.
$$
So we've recovered Rudin's version of Parseval, but we had to change our inner product to accommodate.
Addendum: Of course, the formulas are equivalent to each other once you write them out, but proper representation is key here. This is basically equivalent to the idea that in a finite-dimensional vector space, the same vector can be represented in several different ways depending on the choice of basis. Rudin has made a change of basis by demanding that the $\{e^{inx}\}$ be orthonormal, and consequently the representation of a function $f$ as a sequence of Fourier coefficients has to change (namely, by a factor of $1/2\pi$ - it's a scaling change of variable).
With $f(x) = x^2$, the complex Fourier series should be indexed by the integers. That is,
$$ f(x) \sim c_0 + \sum_{n=-\infty}^{\infty} c_n \mathrm{e}^{inx}, $$
where the Fourier coefficients are given by
$$ \frac{1}{2\pi} \int_{-\pi}^{\pi} x^2 \mathrm{e}^{-inx}\, \mathrm{d} x = \begin{cases}
\frac{2}{n^2}(-1)^n & \text{if $n\ne 0$, and} \\
\frac{\pi^2}{3}
& \text{if $n=0$.}
\end{cases}$$
(I get this after two integration by part steps–I'm leaving off the details here, as you seemed to have worked them out correctly in your work.)
Via little bit of manipulation, this becomes
\begin{align*}
f(x)
&\sim \sum_{n=-\infty}^{\infty} c_n \mathrm{e}^{inx} \\
&= c_0 + \sum_{n=-\infty}^{-1} c_{n} \mathrm{e}^{inx} + \sum_{n=1}^{\infty} c_{n} \mathrm{e}^{inx} \\
&= c_0 + \sum_{n=1}^{\infty} c_{-n} \mathrm{e}^{-inx} + \sum_{n=1}^{\infty} c_{n} \mathrm{e}^{inx} \\
&= \frac{\pi^2}{3} + \sum_{n=1}^{\infty} \frac{2}{(-n)^2} (-1)^{-n}\mathrm{e}^{-inx} + \sum_{n=1}^{\infty} \frac{2}{n^2} (-1)^{n}\mathrm{e}^{inx} \\
&= \frac{\pi^2}{3} + \sum_{n=1}^{\infty} \frac{2}{n^2} (-1)^n\left( \mathrm{e}^{inx} + \mathrm{e}^{-inx} \right) \\
&= \frac{\pi^2}{3} + \sum_{n=1}^{\infty} \frac{4}{n^2} (-1)^n \left( \frac{\mathrm{e}^{inx} + \mathrm{e}^{-inx}}{2} \right) \\
&= \frac{\pi^2}{3} + \sum_{n=1}^{\infty} \frac{4}{n^2} (-1)^n \cos(nx),
\end{align*}
which is the result you were hoping to get.
Best Answer
We have
$$\frac13 = |\hat{f}(0)|^2 + 2\sum_{n=1}^\infty \frac{1}{4 \pi^2n^2}$$
where $\hat{f}(0) = \int_0^1 x \, dx$.