Answer
See below
Work Step by Step
The general solution for the given differential equation is: $y(x)=c_1e^x+c_2 xe^x+A_0 x^2e^x$
The trial solution for $y_p= A_0 x^2e^x$ can be computed as by plugging back into the given differential equation.
So, we have: $(D-1)^2y_p(x)=6e^x\\ (D^2-2D+1)(A_0x^2e^x)=6e^x\\ 2A_0e^x +2A_0xe^x=6e^x$
On comparing co-efficients, we get: $A_0=3$
Therefore, the general solution for the given differential equation is: $y(x)=c_1e^x+c_2xe^x+3x^2e^x$