We have, f(x)=inte^xdx which comes out to be e^x +C where C is the constant of integration.
We also have f(0)=-2.Plugging in this value in the expression we derived earlier, we get e^0 +C=-2 or C=-2-1 which is -3. Thus,the expression comes out to be e^x -3