In the A* algorithm, the cost function
$f(n)=g(n)+h′(n)$ , where:
$g(n)$ is the actual cost of getting from the initial state to the current node,
$h′(n)$ is an estimate of the cost of getting from the current node to the goal state.
To find a path involving the fewest number of steps, you should minimize the actual cost of getting from the initial state to the current node $(g(n))$. Therefore, in this context, you should test:
B. $g=0$
This implies that you are only considering the estimated cost $h’$ in the evaluation function, favoring paths that have the lowest estimate of the cost of getting from the current node to the goal state.
So, the correct option is B.