\(\frac{x^2-9-\left(4x-2\right)\left(x-3\right)}{x^2-6x+9}\)
\(=\frac{\left(x-3\right)\left(x+3\right)-\left(4x-2\right)\left(x-3\right)}{\left(x-3\right)^2}\)
\(=\frac{\left(x-3\right)\left[\left(x+3\right)-\left(4x-2\right)\right]}{\left(x-3\right)^2}\)
\(=\frac{x+3-4x+2}{x-3}\)
\(=\frac{-3x+5}{x-3}\)