In a metric space $X$, let $x_n$ be a sequence that converges to the element $a$. Then the set $M=\left\{a, x_1, x_2, \ldots\right\}$ is compact.
Solution 1.
We consider that the set $M$ is cover compact (compact). Let $(O_\lambda)_{\lambda \in \lambda}$ be an open covering of $M$, that is, every set $O_\lambda \subseteq X$ is open and, moreover, it holds that
$$
M \subseteq \bigcup_{\lambda \in \lambda} O_\lambda.
\tag{1}
$$
To prove that $M$ is cover compact, we need to show that $M$ can only be covered by finitely many of the open sets (finite partial cover). First, because of (1), there is an index $\lambda_0 \in \lambda$ with $a \in O_{\lambda_0}$. Thus $a$ is an interior point of the open set $O_{\lambda_0}$, which is why we find a number $\varepsilon>0$ with $B_{\varepsilon}(a) \subseteq O_{\lambda_0}$. As usual, here $B_{\varepsilon}(a)$ denotes the open ball around $a$ with radius $\varepsilon$.
Since the sequence $\left(x_n\right)_n$ converges to $a$ by premise there is by definition a natural number $N \in \mathbb{N}$ which depends on $\varepsilon$, with
$$
d(x_n,a)<\varepsilon \quad \text{ or equivalently } \quad x_n \in B_{\varepsilon}(a) \quad \forall\, n \geq N.
$$
But this means just $x_n \in O_{\lambda_0}$ for all $n \geq N$. Thus, except for finitely many sequence members, all members lie in the open set $O_{\lambda_0}$. Finally, because of (1), for every $j \in\{1, \ldots, N-1\}$ we find an index $\lambda_j \in \Lambda$ and an open set $O_{\lambda_j}$ with $a_j \in O_{\lambda_j}$.
Let us now write
$$
M=\{x_1, \ldots, x_{N-1}\} \cup\{x_n \in X \mid n \in \mathbb{N} \text { with } n \geq N\} \cup\{a\},
$$
so with our considerations it follows as desired
$$
M \subseteq \bigcup_{j=1}^{N-1} O_{\lambda_j} \cup O_{\lambda_0},
$$
that is, we have found a finite partial cover of the set $M$.
Thus, as desired, we have shown that the set $M$ is compact.
Solution 2.
We will prove that the set $M$ is sequence compact (compact). To do this, we need to show that every sequence from $M$ has a convergent subsequence. To this end, let $(y_n)_n \subseteq M$ be any sequence. We distinguish the following two cases:
(a) The sequence takes a value in $M$ any number of times. Thus the sequence $(y_n)_n$ automatically has a constant subsequence which is obviously convergent.
(b) The sequence takes any value from $M$ only finitely often. Let us define for $k \in \mathbb{N}$ the set
$$
M_k=\left\{x_j \in X \mid j \in\{1, \ldots, k\}\right\},
$$
then for each $k \in \mathbb{N}$ there exists at least one index
$$
N_k \in \mathbb{N}: x_n \notin M_{N_k}\quad \forall\, n \geq N_k.
$$
Now let $\varepsilon>0$ be arbitrary. Since the sequence $ (y_n )_n$ converges to $a$ by precondition,
$$
\exists\, K \in \mathbb{N}: d(y_n-a)<\varepsilon\quad \forall\,n \geq K.
$$
Thus, for $n \geq N_K$ it follows.
$$
d(y_n-a)=d(x_n-a)<\varepsilon,
$$
that is, the subsequence $(y_n)_n$ also converges to $a$.
Thus, as desired, we have shown that the set $M$ is compact.