I would write the ODE in standard linear form:
\(\displaystyle \frac{dy}{dx}-y=x\)
Now, it appears you have correctly computed your integrating factor \(\displaystyle \mu(x)=e^{-x}\) and so we get:
\(\displaystyle e^{-x}\frac{dy}{dx}-e^{-x}y=xe^{-x}\)
\(\displaystyle \frac{d}{dx}\left(e^{-x}y\right)=xe^{-x}\)
Integrating with respect to \(\displaystyle x\), we obtain:
\(\displaystyle e^{-x}y=-e^{-x}(x+1)+c_1\)
It appears you made a minor error integrating. If you can post your work, perhaps we can figure out where.
Hence:
\(\displaystyle y(x)=c_1e^x-(x+1)\)