let $f: [a,b] \rightarrow \mathbb{R}$ be a differentiable function. show that the set $A = \{x \in [a,b] | f(x) = 0 \}$ is finite when the set $B =\{x \in [a,b] | f(x) = f'(x) = 0 \} = \emptyset$ .
My attempt: for the sake of contradiction, suppose $A$ is infinite. then there exists a sequence $\{x_n\}$ such that $f(x_n)=0$ for all $n \in \mathbb{N}$ . then $\{x_n\}$ is bounded and so there exists a subsequence $\{ x_{n_k} \} \subset \{x_n\}$ that converges to some point $c \in [a,b]$ we also can conclude that $\lim_{k \rightarrow \infty} f(x_{n_k}) = f(c) = 0$.
on the other hand, by mean value theorem on every interval $[x_{n_k} , x_{n_{k+1}} ]$ there exists a point $c_k \in [x_{n_k} , x_{n_{k+1}} ]$ such that $f'(c_k) = 0$.
Now I get stuck and can't go further to reach a contradiction.
any help will be appreciated.