Answer
See below
Work Step by Step
The general solution for the given differential equation is: $y(x)=c_1e^{2x}+c_2 e^{-x}+A_0\sin x+B_0\cos x$
The trial solution for $y_p=A_0\sin x+B_0\cos x$ can be computed as by plugging back into the given differential equation.
So, we have: $(D^2+D-2)y_p(x)=4\cos x-2\sin x\\
(D^2+D-2)(A_0\sin x+B_0\cos x)=4\cos x -2\sin x\\(-3B_0+A_0)\cos x +(-B_0-3A_0)\sin x=4\cos x-2\sin x$
On comparing coefficients, we get: $A_0=1,B_0=-1$
Therefore, the general solution for the given differential equation is: $y(x)=c_1e^{2x}+c_2e^{-x}+\sin x-\cos x$
Given $y(0)=-1\\y'(0)=4$
Substitute $c_1+c_2=0\\
2c_1-c_2=3$
Then we have $c_1=1\\
c_2=-1$
Hence, $y=e^{2x}-e^{-x}+\sin x-\cos x$