Let $(M,d)$ be a metric space and let $(x_n)_{n\in\Bbb N}\subset M$ be a convergent (to some $x\in M$) sequence with only finitely many distinct values. Prove that the sequence is ultimately constant.
My attempt: By definition, we need to find an $n_0$ such that $x_n=a$ for all $n_0\leq n$. Since $x_n\to x$, we have $d(x_n,x)\to 0$, but $\{x_n:n\in\Bbb N\}$ is finite, so there is $n_0$ such that $d(x_{n_0},x)=0$. Taking this $n_0$, we have $x_n=x$ for all $n_0\leq n$.
Is this proof valid?
The problem with the proof is when you say "there is $n_0$ such that $d(x_{n_0},x)=0$. Taking this $n_0$ and for all $n\geq n_0$ we have $x_n=x$". You don't explain your reasoning for the existence of such an $n_0$, and based on how things are worded, it doesn't explain why $x_n=x$ for all $n\geq n_0$.
What you want to show is the following:
Here's a hint for how to do it. Cook up some clever $\varepsilon>0$ using the fact that $\{x_n:n\in\mathbb N\}$ is finite, and use this $\varepsilon$ to find an $N$ such that $d(x,x_n)<\varepsilon$ for all $n\geq N$. Then assume that there exist $n,m\geq N$ such that $x_n\neq x_m$, and derive a contradiction.