The exercise on multiplicity and set of zeros does not require that f(a) and f(b) be nonzero. This condition is only necessary for a subsequent exercise that involves the signs of f(a) and f(b). In that later exercise, the values must be strictly positive or strictly negative for the analysis to be valid. Understanding these requirements is crucial for correctly approaching the exercises. Clarity on these distinctions will aid in successfully completing the tasks.
For that exercise, there seems to be no need for $f(a)$ and $f(b)$ to be nonzero. It looks as though that requirement is only needed for the following exercise, which refers to the signs of $f(a)$ and $f(b)$. These need to be strictly positive or strictly negative for that exercise to make sense.