how can we show $\frac{\pi^2}{8} = 1 + \frac1{3^2} +\frac1{5^2} + \frac1{7^2} + …$?
Let $f(x) = \frac4\pi \cdot (\sin x + \frac13 \sin (3x) + \frac15 \sin (5x) + \dots)$. If for $x=\frac\pi2$, we have
$$f(x) = \frac{4}{\pi} ( 1 - \frac13 +\frac15 - \frac17 + \dots) = 1$$
then obviously :
$$ 1 - \frac13 +\frac15 - \frac17 + \dots=\frac{\pi}{4}$$
Now how can we prove that:
$$\frac{\pi^2}{8} = 1 + \frac1{3^2} +\frac1{5^2} + \frac1{7^2} + \dots$$
Solution 1:
From the Basel Problem, we have $$\frac{\pi^2}{6} = \frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \frac{1}{4^2}\dots$$ $$\frac{\pi^2}{24} = \frac{\pi^2}{6\cdot 2^2} = \frac{1}{2^2} + \frac{1}{4^2} + \frac{1}{6^2}\dots$$
so that
$$\begin{align}\frac{\pi^2}{8} &= \frac{\pi^2}{6} - \frac{\pi^2}{24}\\&=\frac{1}{1^2} + \frac{1}{3^2} + \frac{1}{5^2} + \dots \end{align}$$
Solution 2:
To prove the sum $\frac{\pi^2}{8}=1+\frac{1}{3^2}+\frac{1}{5^2}+\frac{1}{7^2}+\dotsc$ I don't see how it could be useful to refer to $$1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\dotsc=\frac{\pi}{4}$$ It might, however, be convenient to recall the famous sum of Euler: $$\frac{1}{1^2}+\frac{1}{2^2}+\frac{1}{3^2}+\dotsc=\frac{\pi^2}{6}$$ and to think of possible variations of this sum in order to obtain your desired sum...
What terms are missing between these two sums?
How is this difference related to one of the original sums?
$\dotsc$