How to solve this integral with sigma notation? Let $$f(x) = \sum_{n=1}^{N}a_{n}sin(nx)$$.
For a positive integer m, show the following:

I've never even had a first step for this one even after hours of trying to understand it. I asked my professor and she told me it involves solving integrals involving integrals. Tried another day trying to solve it, but ended up with nothing. Any help out there would be deeply appreciated
Edit:
I tried to solve it, but still couldn't figure out an answer for a and not sure about the answer of b
(a)
$$\frac{1}{\pi}\int^{\pi}_{-\pi}\sum_{n=1}^{N}a_{a}sin(nx)sin(mx)dx\\
\frac{1}{\pi}\sum_{n=1}^{N}a_{n}\int^{\pi}_{-\pi}\sin(nx)sin(mx)dx\\
\frac{1}{\pi}\sum_{n=1}^{N}a_{n}\int^{\pi}_{-\pi}\frac{1}{2} \cos(nx-mx)-\cos(nx+mx)dx\\
\frac{1}{2\pi}\sum_{n=1}^{N}a_{n}\int^{\pi}_{-\pi} \cos(nx-mx)-\cos(nx+mx)dx\\
\int^{\pi}_{-\pi} \cos(nx-mx)dx-\int^{\pi}_{-\pi}\cos(nx+mx)dx\\
\frac{1}{2\pi}\sum_{n=1}^{N}a_{n}[\frac{\sin((n-m)\pi)}{n-m}-\frac{\sin((n-m)(-\pi))}{n-m}-\frac{\sin((n+m)\pi)}{n+m}+\frac{\sin((n+m)(-\pi))}{n+m}+C]
\frac{1}{2\pi}\sum_{n=1}^{N}a_{n}[0-0-0+0+C]\\0$$
When I solve it like this, all of the cases result to 0. Which is not similar to the equality stated in the given
(b)
$$\frac{1}{\pi}\int^{\pi}_{-\pi}\sum^{N}_{n=1}a^2_n\sin^2(nx)dx\\
\frac{1}{\pi}\sum^{N}_{n=1}a^2_n\int^{\pi}_{-\pi}\sin^2(nx)dx\\
\int^{\pi}_{-\pi}\sin^2(nx)dx\\
\frac{1}{2}(\pi-\frac{\sin(2\pi x)}{2n})-\frac{1}{2}(-\pi-\frac{\sin(-2\pi x)}{2n})\\
(\frac{\pi}{2}-0)-(\frac{-\pi}{2}-0)\\
\frac{1}{\pi}\sum^{N}_{n=1}a^2_n\pi\\
\sum^{N}_{n=1}a^2_n$$

Hint
Regarding (a), as the integral is linear, it is sufficient to compute
$$\int_{-\pi}^\pi \sin nx \sin mx \ dx$$ for $m,n \in \mathbb Z$. Which can easily be done using the trigonometric formula
$$\sin a \sin b = \frac{1}{2}\left(\cos \frac{a-b}{2} - \cos \frac{a+b}{2}\right)$$
For part (b), use part (a) expanding $f^2(x) = f(x) \cdot f(x)$.
