Do the same as I done above except use -2 instead of -6.
Remember, when you integrate a derivative, the function remains.
\(\displaystyle \displaystyle \int\frac{d}{dx}[ye^{-2x}]=ye^{-2x}\)
Don't forget the constant of integration on the right side.
\(\displaystyle \int xe^{2x}\cdot e^{-2x}=\int xdx=\frac{x^{2}}{2}+C\)
So, we have \(\displaystyle ye^{-2x}=\frac{x^{2}}{2}+C\)
Now, solve for y.
\(\displaystyle y=\left(\frac{x^{2}}{2}+C\right)e^{2x}\)
The integrating factor of \(\displaystyle \displaystyle\frac{dy}{dx}+p(x)y=g(x)\) is
\(\displaystyle e^{\int p(x)dx}\)
You appear to be familiar with undetermined coefficients yet unfamiliar with solving a linear DE using an integrating factor?.
The latter is dealt with earlier in a typical DE course. As a matter of fact, the integrating factor is often brought up in calc II.