It is certainly not clear but I will assume that you wanted to additionally write $x=\lim_{n\to\infty} x_n$ and forgot it.
Firstly, as @Mr.GandalfSauro commented above, your idea is definitely false and I would say it is important to know it.
To show that $\{x\}\cup\{x_n:n\in \mathbb{N}\}$ is compact, we can use the definition of a compact set. A set $K\subset X$ is compact if and only if for every collection $\mathcal{C}$ of open sets in $(X,d)$ such that $$K\subset\bigcup_{A \in \mathcal{C}} A$$ there exists a finite subcollection $\mathcal{C}'\subset \mathcal{C}$ such that $$K \subset \bigcup_{A \in \mathcal{C}'}A.$$
Let us try to apply this. Let $\mathcal{C}$ be a collection of open sets of $(X,d)$ such that $$\{x\}\cup\{x_n:n\in\mathbb{N}\} \subset \bigcup_{A \in \mathcal{C}}A.$$ Notice that there exists $A_0 \in \mathcal{C}$ such that $x \in A_0$. Since $A_0$ is open and $x$ is the limit of $(x_n)_{n \in \mathbb{N}}$, there exists $N \in \mathbb{N}$ such that $$n \geq N \Rightarrow x_n \in A_0.$$ Furthermore, for each $j =1,\ldots,N-1$, there exists $A_j \in \mathcal{C}$ such that $x_j \in A_j$. Now, we just observe that $\{A_j : j=0,1,\ldots,N-1\}$ is a finite subcollection of $\mathcal{C}$ that covers $\{x\}\cup\{x_n:n\in\mathbb{N}\}$ and we are done.