Please help with this question! I was given the answer but wasn’t sure how it got to that answer

Answer:
Explanation:
Given:
[tex]\begin{gathered} g(x)=-x^2-ax+3 \\ g(-2)=-9 \end{gathered}[/tex]It is given that g(-2)=-9, so it means that x=-2. We substitute x=-2 into -x^2-ax+3 to get the value of a.
[tex]undefined[/tex]