To factor an expression of the form:
[tex]x^2+bx+c[/tex]we find two numbers B and C that fulfills the following properties:
[tex]\begin{gathered} B+C=b \\ BC=c \end{gathered}[/tex]In this case we have b=-4 and c=-12. We can choose B=-6 and C=2. Then we write the expression as:
[tex]x^2-4x-12=x^2-6x+2x-12[/tex]and we factor the common factors in the first two and last terms:
[tex]\begin{gathered} x^2-4x-12=x^2-6x+2x-12 \\ =x(x-6)+2(x-6) \\ =(x+2)(x-6) \end{gathered}[/tex]Therefore:
[tex]x^2-4x-12=(x+2)(x-6)[/tex]