The easiest method to use in this incidence is integratation by parts.
So let u=x and dv/dx=exp(x). Therefore du/dx=1 and v=exp(x).
Then we use the formula where integral(udu/dx)=uv-integral(v*du/dx).
So integral(xexp(x))=xexp(x)-integral(exp(x)*1)
=x*exp(x)-integral(exp(x))
=x*exp(x)-exp(x)+c
Don't forget the +c