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