My approach was to start by integration by parts. $$\int_{0}^{1}f(x)x^2 dx = \frac{1}{3}(f(1) - \int_{0}^{1} f'(x)x^3 dx)$$ Now if I can bound $(f(1) - \int_{0}^{1} f'(x)x^3 dx)$ by $f(0)$ and $f(1)$ then we can use the intermediate value theorem and write it as some $f(c)$.
But this doesn't work. Can someone provide some hints?