From $f(x)-f(0)=\int_0^xf'(t)dt$, integrate by parts (notice $dt$ not $dx$) to reach $f(x)=f(0)+f'(0)x+\int_0^xf''(t)(x-t)dt$.
Let $u=f'(t)$ and $dv=dt$.
Then, $du=f''(t)dt$ and $v=t$.
Now, $\int_0^xf'(t)dt=tf'(t)|_0^x-\int_0^xtf''(t)dt=xf'(x)-\int_0^xtf''(t)dt$, which is not the desired formula. How should we proceed?