Answer
$y=1-7e^{-x^2/2}$
Work Step by Step
Here, we have $y'+xy=x$
The integrating factor is: $I=e^{\int xdx}=e^{x^2/2}$
Now, $e^{x^2/2}[y'+xy]=e^{x^2/2}x$
This gives: $\int ye^{x^2/2}=\int e^{x^2/2} x$
or, $y=1+ce^{-x^2/2}$
After applying the initial conditions, we have $ c=-7$
So, $y=1+ce^{-x^2/2} \implies y=1-7e^{-x^2/2}$