Answer
$f'\left( x \right) = \left( {{x^2} + 2x} \right){e^x}{\text{ and }}f''\left( x \right) = \left( {{x^2} + 4x + 2} \right){e^x}$
Work Step by Step
$$\eqalign{
& f\left( x \right) = {x^2}{e^x} \cr
& {\text{Differentiating}} \cr
& f'\left( x \right) = \frac{d}{{dx}}\left[ {{x^2}{e^x}} \right] \cr
& {\text{Using the formula }}\left( {fg} \right)' = fg' + gf',{\text{ let }}f = {x^2}{\text{ and }}g = {e^x} \cr
& f'\left( x \right) = {x^2}\frac{d}{{dx}}\left[ {{e^x}} \right] + {e^x}\frac{d}{{dx}}\left[ {{x^2}} \right] \cr
& {\text{Computing derivatives}} \cr
& f'\left( x \right) = {x^2}\left( {{e^x}} \right) + {e^x}\left( {2x} \right) \cr
& f'\left( x \right) = {x^2}{e^x} + 2x{e^x} \cr
& {\text{Factoring}} \cr
& f'\left( x \right) = \left( {{x^2} + 2x} \right){e^x} \cr
& \cr
& {\text{Find }}f''\left( x \right),{\text{ differentiating }}f'\left( x \right) \cr
& f''\left( x \right) = \frac{d}{{dx}}\left[ {\left( {{x^2} + 2x} \right){e^x}} \right] \cr
& {\text{Using the formula }}\left( {fg} \right)' = fg' + gf',{\text{ let }}f = {x^2} + 2x{\text{ and }}g = {e^x} \cr
& f''\left( x \right) = \left( {{x^2} + 2x} \right)\frac{d}{{dx}}\left[ {{e^x}} \right] + {e^x}\frac{d}{{dx}}\left[ {{x^2} + 2x} \right] \cr
& f''\left( x \right) = \left( {{x^2} + 2x} \right){e^x} + {e^x}\left( {2x + 2} \right) \cr
& {\text{Factoring}} \cr
& f''\left( x \right) = \left[ {\left( {{x^2} + 2x} \right) + \left( {2x + 2} \right)} \right]{e^x} \cr
& f''\left( x \right) = \left( {{x^2} + 4x + 2} \right){e^x} \cr} $$