Answer
$$y= \frac{1}{2} +e^{-x}-\frac{11}{2} e^{-2x} .$$
Work Step by Step
This is a linear equation and has the integrating factor as follows $$\alpha(x)= e^{\int P(x)dx}=e^{ \int 2 dx}=e^{2x}.$$
Now the general solution is
\begin{align}
y& =\alpha^{-1}(x)\left( \int\alpha(x) Q(x)dx +C\right)\\
& =e^{-2x}\left( \int e^{2x}(1+e^{-x})dx+C\right)\\
& =e^{-2x}\left( \frac{1}{2} e^{2x}+ e^{x}+C\right)\\
& =\frac{1}{2} +e^{-x}+C e^{-2x} \end{align}
Since, $y(0)=-4$, then $C=-\frac{11}{2}$
Thus, the general solution is:
$$y= \frac{1}{2} +e^{-x}-\frac{11}{2} e^{-2x} .$$