How do I factor out The gcf of this problem

[tex]x^2\underline{(x-6)}+2\underline{(x-6)}\implies \stackrel{common~factoring}{\underline{(x-6)}(x^2+2)}[/tex]