I found the Fourier series of $f(x) = |x|$ to be $$f(x) = \frac{\pi}{2} + \sum_{n = 1}^\infty 2 \cos(nx) \frac{-1 + (-1)^n}{\pi n^2}$$
Taking $x = 0$, prove that a) $$ \sum_{n: odd \geq 1} \frac{1}{n^2} = \frac{\pi^2}{8}$$ and b) $$\sum_{n = 1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}$$
Problem a) is easy is to show if you assume changing the index of $n$ does not change the equality (which it should). In that case you obtain $$0 = \frac{\pi}{2} + \sum_{n:odd \geq 1} \frac{-4}{\pi n^2} \rightarrow \sum_{n:odd \geq 1} \frac{1}{n^2} = \frac{\pi^2}{8} $$ But the Fourier series representation I found for $f$ has a sum over all $n \geq 1$ and not just the odd $n$.
For problem b) Im not sure what to do about the $(-1)^n$ term in the numerator.
About a), you get only odd $n$'s because $-1+(-1) ^n$ is zero for even $n$!
About $(b) $, if you define
$$A= \sum_{n \ge 1 \text{ even}} \frac{1}{n^2} ,\ \ \ B =\sum_{n\ge 1 \text{ odd}} \frac{1}{n^2} $$
Then you have, setting $n=2m$ for $n$ even:
$$ A = \sum_{\ge 1 \text{ even}} \frac{1}{n^2} = \sum_{m\ge 1 } \frac{1}{4 m^2} = \frac{1}{4} ( A+B) $$
Can you continue from here?