Solve Integration area I am confused why the answer for $$\int_0^{\infty}\left(x-\frac{1}{\lambda}\right)^2\lambda e^{-\lambda x}\ dx$$
  is $$\frac{1}{\lambda^2}$$
I get mine as $$\frac{5}{\lambda^2}$$
Official answer is as follows 

but I do not get the last part when it is $$\frac{-2}{\lambda^2}$$
 instead of $$\frac{2}{\lambda^2}$$
My working for the step before is as follows
f(x) = 2x-2 \quad
f'(x) = 2 \quad
g(x) = -(e^-λx)/λ \quad
g'(x)= e^-λx
Essentially, it means Area f(x)g(x) - Integral f'(x)g(x)dx. Why is it -2/λ when f'(x)g(x) = -2(e^-λx)/λ and I take -2/λ out of the integral to make it 
2/λ∫(e^-λx)20dx

$$
\begin{align}
\int_0^\infty\left(x-\frac1\lambda\right)^2\lambda e^{-\lambda x}\,\mathrm{d}x
&=\frac1{\lambda^2}\int_0^\infty(x-1)^2e^{-x}\,\mathrm{d}x\\
&=\frac1{\lambda^2}\int_0^\infty\left(x^2-2x+1\right)e^{-x}\,\mathrm{d}x\\
&=\frac1{\lambda^2}(2!-2\cdot1!+0!)\\
&=\frac1{\lambda^2}
\end{align}
$$
Where we've used
$$
\int_0^\infty x^ne^{-x}\,\mathrm{d}x=n!
$$
which can be proven by induction and integration by parts.
