I am supposed to factor this expression. I came up with (g-3)(g+3)

The expression is given to be:
[tex]g^2-9[/tex]Rewrite the term:
[tex]9=3^2[/tex]Therefore, the expression becomes:
[tex]g^2-3^2[/tex]Apply the difference of two squares formula:
[tex]x^2-y^2=\left(x+y\right)\left(x-y\right)[/tex]Therefore, the expression becomes:
[tex]g^2-3^2=\left(g+3\right)\left(g-3\right)[/tex]ANSWER
[tex]g^2-9=\left(g+3\right)\left(g-3\right)[/tex]