Step 1: Use substitution.
Let:
\[
u = x + 4 \quad \Rightarrow \quad du = dx.
\]
Rewriting the given integral:
\[
I = \int \frac{(u - 1)}{u^2} e^{u - 4} \,du.
\]
Expanding:
\[
I = \int \left( \frac{u}{u^2} - \frac{1}{u^2} \right) e^{u-4} \,du.
\]
\[
I = \int \left( \frac{1}{u} - \frac{1}{u^2} \right) e^{u-4} \,du.
\]
Step 2: Solve by integration by parts.
Using integration by parts for:
\[
\int \frac{1}{u} e^{u-4} \, du.
\]
Let:
\[
v = \frac{1}{u}, \quad dv = -\frac{du}{u^2}.
\]
\[
w' = e^{u-4}, \quad w = e^{u-4}.
\]
Using integration by parts:
\[
I = \frac{e^{u-4}}{u} + C.
\]
Substituting back \( u = x+4 \):
\[
I = \frac{e^x}{x+4} + C.
\]
Thus, the final result is:
\[
I = e^x \frac{1}{x+4} + C.
\]