\(\frac{-2}{x^2-4x+4}+\frac{x+1}{x-2}+\frac{x+2}{x^2-4x+4}\)
\(=\frac{-2}{\left(x-2\right)^2}+\frac{\left(x+1\right)\left(x-2\right)}{\left(x-2\right)^2}+\frac{\left(x+2\right)}{\left(x-2\right)^2}\)
\(=\frac{-2+x^2-x-2+x+2}{\left(x-2\right)^2}\)
\(=\frac{x^2-2}{\left(x-2\right)^2}\)