I want to show, by integrating twice, that any solution to (1) is a solution to (2) detailed below: $$ y''=f(y) \qquad \qquad y(0)=0 \qquad y'(0)=1 \qquad(1)$$ $$ y(x)= x+ \int_0^x{(x-s)f(y(s)})ds \qquad (2)$$
First I got: $$ [y'(x)]_0^x = \int_0^x{f(t)}dt $$ so $$ y'(x) =1 + \int_0^x{f(t)}dt $$
Then I put: $$ y(x) = x + \int_0^x{\int_0^s{f(t)}dt} ds $$ But I can't make the final step! Any help would be much appreciated.
You should have $f(y(t))$ in the integrals, so from your work we have that $$ y(x) = x + \int_0^x\int_0^s f(y(t)) \, dt \, ds.$$ For simplicity, set $F(s) = \int_0^s f(y(t)) \, dt$. Note that $F'(s) = f(y(s)).$ Then we can apply integration by parts to the integral $\int_0^x\int_0^s f(y(t)) \, dt\, ds = \int_0^x F(s)\, ds$ to get that \begin{align*} \int_0^x 1\cdot F(s) \, ds &= sF(s)|^x_0 - \int_0^x s F'(s)\, ds \\ &=xF(x) -\int_0^xsf(y(s)) \, ds \\ &= x\int_0^xf(y(s))\, d s-\int_0^xsf(y(s)) \, ds \\ &= \int_0^x(x-s)f(y(s))\, ds. \end{align*} Thus we have that \begin{align*} y(x) &= x + \int_0^x\int_0^s f(y(t)) \, dt \, ds \\ &= x + \int_0^x(x-s)f(y(s))\, ds \end{align*} as desired.