The solution of any linear ODE with constant coefficients $$a_ny^{n} + a_{n-1}y^{n-1} + \ldots + a_1y' + a_0y =g(x)$$ is given by $$y = y_c + y_p$$ where $y_c$, the complimentary solution, is the general solution of the homogeneous equation $$a_ny^{n} + a_{n-1}y^{n-1} + \ldots + a_1y' + a_0y=0$$ and $y_p$, the particular solution, is any solution of the original equation.

The solutions of the homogeneous equation are all of the form $e^{rx}$ (where $r$ is possibly complex) and by substituting $y=e^{rx}$ into the homogenous equation we find the characteristic polynomial which can be solved for values of $r$, the number of solutions determined by the degree of the characteristic polynomial which in turn is determined by the order of the original ODE.

In this case we get \begin{align}

r^4-1 &= 0 \\

(r-1)(r+1)(r-i)(r+i) &= 0

\end{align}

It can be shown that real-valued solutions of the ODE with complex-conjugate values of $r = u \pm iv$ are equivalent to solutions $y = e^{ux}(A\sin vx + B\cos vx)$. Thus the complementary solution of $$y''''-y=-e^{-x}$$ is $$y_c = Ae^x + Be^{-x} + C\sin{x} + D\cos{x}$$

For the particular solution, using the method of undetermined coefficients (other methods are available) we guess the appropriate template for a solution, in this case $y_p = Exe^{-x}$ where $E$ is a constant to be determined. The $x$ in this term comes in because $Be^{-x}$ is already a solution (where $B$ is an arbitrary constant of integration).

Thus we substitute $y_p=Exe^{-x}$ into the original ODE to get

\begin{align}

Exe^{-x} - 4Ee^{-x} - Exe^{-x} &= -e^{-x} \\

\implies E &= \tfrac14

\end{align}

And so we have a solution \begin{align}

y &= y_c + y_p \\

&= \tfrac14xe^{-x} + Ae^x + Be^{-x} + C\sin{x} + D\cos{x}

\end{align}

All of the above is a method standard for solving a second order ODE with constant coefficients extended to the fourth order equation you presented. This extension should be taught in the same course as the method for solving second order equations.