Here is how one might write out the explanation of how to find \(\int xe^{x}\,dx\) from start to finish:
\begin{align*}
\int xe^{x}\,dx\\
& u=x & dv = e^x\,dx\\
& du=1\cdot\,dx & v=e^x\\
\int xe^x \,dx &= xe^x-\int e^x \,dx\\
&= xe^{x}-e^x+C
\end{align*}