Let's ignore the factor of $-2$ for now in the numerator, since we can adjust it later by multiplying both sides by $-2$.
Taking $t$ as $x-2$ in the L.H.S we get the integral $$\int \frac{e^{t+2}(t^{2} -2t +2)}{t^{3}}dt$$
Applying ILATE rule on $\int\frac{e^{t+2}t^2}{t^3}dt$ we get,
$$ = \frac{e^{t+2}}{t} + \int \frac{e^{t+2}}{t^{2}}dt - 2\int \frac{e^{t+2}}{t^2}dt + 2 \int \frac{e^{t+2}}{t^3}dt$$
$$ = \frac{e^{t+2}}{t} - \int \frac{e^{t+2}}{t^2}dt + 2 \int \frac{e^{t+2}}{t^3}dt$$
Using the ILATE rule once again on the middle term in the above expression, we get
$$ = \frac{e^{t+2}}{t} - \left(\frac{e^{t+2}}{t^2} + 2\int \frac{e^{t+2}}{t^3}dt\right) + 2 \int \frac{e^{t+2}}{t^3}dt$$
So the answer is
$$ = \frac{e^{t+2}}{t} - \frac{e^{t+2}}{t^2}$$
Now replace $t = x-2$ in the above equation
$$\frac{e^{x}(x-3)}{(x-2)^2}$$
Now just multiply LHS and RHS by $-2$ to get the desired form.
Q.E.D.