$f(x)=\left(3 x^{2}+a x-2-a\right) e^{x}$
$f'(x)=\left(3 x^{2}+a x-2-a\right) e^{x}+e^{x}(6 x+a)$
$=e^{x}\left(3 x^{2}+x(6+a)-2\right)$
$f'(x)=0$ at $x=1$
$\Rightarrow 3+(6+a)-2=0$
$a=-7$
$f'(x)=e^{x}\left(3 x^{2}-x-2\right)$
$=e^{x}(x-1)(3 x+2)$
$x =1$ is point of local minima
$x =\frac{-2}{3}$ is point of local maxima