I'm not sure how to approach this question. I found the relation $f(x) = -f''(x)$ since:
$f'(x) = \frac{d}{dx} \int_0^{\pi}\sin(x+y)f(y)dy = \int_0^{\pi}\cos(x+y)f(y)dy$
So $f''(x) = \frac{d}{dx} \int_0^{\pi}\cos(x+y)f(y)dy = \int_0^{\pi}-\sin(x+y)f(y)dy = -f(x)$.
Though, not sure how to show from here that $f$ is of the form $f(x) = a\cos(x) + b\sin(x)$?
We have \begin{align} f(x) &= \int_0^\pi \sin(x+y)f(y)\,dy \\ &= \int_0^\pi (\sin x\cos y + \cos x\sin y)f(y)\,dy \\ &= \left(\int_0^\pi f(y)\sin y \,dy\right)\cos x + \left(\int_0^\pi f(y)\cos y \,dy\right)\sin x. \end{align}