Answer
$ e-\displaystyle \frac{1}{e}$
Work Step by Step
The method of example 4, as suggested by the hint, involves substitution.
Remember to express the LIMITS of integration accordingly.
$\left[\begin{array}{ll}
u=-x+1 & du=-dx\\
dx=-du & \\
& \\
x=0\Rightarrow & u=1\\
x=2\Rightarrow & u=-1
\end{array}\right]$
$\displaystyle \int_{0}^{2}e^{-x+1}dx=\int_{1}^{-1}e^{u}(-du)=-\int_{1}^{-1}e^{u}du$
... Apply the FTC,
... def.integral = [antiderivative$]_{a}^{b}$
$=-\left[e^{u}\right]_{1}^{-1}$
$=-(e^{-1}-e)$
$=e-\displaystyle \frac{1}{e}$