\(9\left(x-3\right)^2-4\left(x+1\right)^2\)
\(=9\left(x^2+9-6x\right)-4\left(x^2+1+2x\right)\)
\(=9x^2+81-54x-4x^2-4-8x\)
\(=\left(9x^2-4x^2\right)-\left(54x+8x\right)+\left(81-4\right)\)
\(=5x^2-62x+77\)
\(=5x^2-5x-77x+77\)
\(=5x\left(x-1\right)-77\left(x-1\right)\)
\(=\left(5x-77\right)\left(x-1\right)\)