Answer
$y=x^2(2+e^x)$ is a solution to the given differential equation.
Work Step by Step
We will find $y'$ and put it into the differential equation along with $y$.
$$y'= (x^2(2+e^x))'= (x^2)'(2+e^x)+x^2(2+e^x)'=2x(2+e^x)+x^2((2)'+(e^x)') = 4x+2xe^x+x^2e^x$$
Putting this into the differential equation we get
The Left side:
$$x(4x+2xe^x+x^2e^x)-2x^2(2+e^x) = 4x^2+2x^2e^x+x^3e^x-4x^2-2x^2e^x = x^3e^x.$$
The Right side is just
$$x^3e^x.$$
We see that the Left side is equal to the Right side so $y=x^2(2+e^x)$ IS a solution to this differential equation.