The solution to the equation,
$\displaystyle y'' + y = 0$
Is given by $\displaystyle y=c_1\sin x + c_2\cos x$
Here you have the equation,
$\displaystyle y''+y = x$
Thus you need to find a particular solution.
By inspection it is easy to see that $\displaystyle y=x$ works.
Thus, the full solution is $\displaystyle y=c_1\sin x + c_2\cos x + x$
this is a second grade ordinary differential equation and you solve it by getting the characteristic equation which in this case is:
$\displaystyle m^2+1=0$
then
$\displaystyle m=\sqrt{-1}= i$ (+ or - )
and then you gotta use the standard solutions for complex numbers and u will get:
$\displaystyle
y=c_1\sin x + c_2\cos x
$
but this is the general solution of the eq. so u gotta apply the parameters variation method or the undefined coefficient method to get the particular solution or also by inspection as the mod said