Answer
See below
Work Step by Step
We are given $y''+2y'+y=2xe^{-x}$
Solve the auxiliary equation for the differential equation.
$r^2+2r+1=0$
Factor and solve for the roots.
$(r+1)^2=0$
Roots are: $r_1=-1$, as a multiplicity of 2.
The general solution is
$y(x)=c_1e^{-x}+c_2xe^{-x}$
The trial solution for $y_p=A_0e^{-2x}+Bxe^{-2x}$ can be computed as by plugging back into the given differential equation.
Then we will have
$A_0=-\frac{2}{3}x^3 \\
B_0=x^2$
Hence,
$y(x)=c_1e^{-x}+c_2xe^{-x}-\frac{2}{3}x^3e^{-x}+x^2xe^{-x}\\
y(x)=c_1e^{-x}+c_2xe^{-x}+\frac{1}{3}x^2e^{-x}$