Factor:
$\displaystyle \displaystyle x^2-x-6=(x-3)(x+2)$
We are finding the zeros of this function, so we set it equal to zero.
$\displaystyle (x-3)(x+2)=0$
By the zero product property, either x-3 or x+2 can be zero.
we have x-3=0 and x+2=0
solving for x, we get x=3, x=-2
Here, try the following problem:
Find both zeros of: $\displaystyle x^2+x-12$
I am not sure what you expect us to do for you.
But this is the answer to your question: $\displaystyle f(3)=0 $.
That is why 3 is the correct answer.
Now if you do not understand why, then that is a different matter.
Sometimes we all must suffer from what we have forgotten.
I felt it better to use a straightforward method before introducing factoring and so on.
There are a few ways to solve.
$\displaystyle 3$ and $\displaystyle -2$ are the two possible answers.
Here is an explanation of why 3 is an answer.
If two values are equal, then when we subtract them the answer is zero.
$\displaystyle 6-6=0$
$\displaystyle \left(x^2-x\right)-6=0$
Therefore
$\displaystyle x^2-x=6$
$\displaystyle x^2=x(x)$
so $\displaystyle x(x)-x(1)=6$
Factor as x is common
$\displaystyle x(x-1)=6$
The factors of 6 that differ by 1 are 3 and 2.
Therefore x is 3 and (x-1) is 2.
However $\displaystyle (-3)(-2)=6$
and so $\displaystyle x=-2$ and $\displaystyle x-1=-3$ is an alternative.
If that makes sense, you could try $\displaystyle (x-3)(x+2)=x^2-x-6$ later.
Frankly I have written for this kind of test, albeit in a different state in the US.
I will tell you the objective of the question.
You are given an option of say five different choices.
Probability three of which are wildly off.
So that leaves only two to check. Which gives $\displaystyle f(a)=0~?$
What this tests is your understanding of the meaning of a zero of a function?
If you have to actually take time to solve the equation, then that docks time from you on the rest of the test. So understanding the basic concepts improves your overall score.
In the case of your question,
were you given values from which to choose ?
In that case, you only need place the values into the equation to see which one gives you zero,
as Plato showed.
$\displaystyle x^2-x-6=0$
If x=2
$\displaystyle 2^2-2-6=(4-2)-6=2-6$ which is not zero.
If x=5
$\displaystyle 5^2-5-6=(25-5)-6=20-6$ which is not zero.
If x=3
$\displaystyle 3^2-3-6=(9-3)-6=6-6$
and that is zero.
No need for factoring...