Answer
$$\frac{{dy}}{{dx}} = {x^2}{e^x}$$
Work Step by Step
$$\eqalign{
& y = \left( {{x^2} - 2x + 2} \right){e^x} \cr
& {\text{Find the derivative of }}y{\text{ with respect to }}x \cr
& \frac{{dy}}{{dx}} = \frac{d}{{dx}}\left[ {\left( {{x^2} - 2x + 2} \right){e^x}} \right] \cr
& {\text{use the product rule }} \cr
& \frac{{dy}}{{dx}} = \left( {{x^2} - 2x + 2} \right)\frac{d}{{dx}}\left[ {{e^x}} \right] + {e^x}\frac{d}{{dx}}\left[ {{x^2} - 2x + 2} \right] \cr
& {\text{solve the derivatives and simplify}} \cr
& \frac{{dy}}{{dx}} = \left( {{x^2} - 2x + 2} \right)\left( {{e^x}} \right) + {e^x}\left( {2x - 2} \right) \cr
& \frac{{dy}}{{dx}} = \left( {{x^2} - 2x + 2} \right){e^x} + {e^x}\left( {2x - 2} \right) \cr
& {\text{factor}} \cr
& \frac{{dy}}{{dx}} = \left( {{x^2} - 2x + 2 + 2x - 2} \right){e^x} \cr
& \frac{{dy}}{{dx}} = {x^2}{e^x} \cr} $$