Property of Compact sets I am trying to prove that the union of compact sets is compact.
Let $X,Y$ be compact sets and let $x_n\in\ X\cup Y$. Then, we have that there is a subsequence $x_{n_k}$ in $X$ or $Y$. Also, since $X$ and $Y$ are compact, it follows that the subsequence converges to some point in $X$ or $Y$. 
Here is where I am not sure how to continue. Is this right so far? 
 A: See, the definition is very simple : given a sequence in the set, there exists a convergent subsequence, which converges in the set itself. Then, the set is compact.
Now, what you have to start with is a sequence $x_n \in X \cup Y$. There is nothing to assume about the nature of this sequence at all. It is therefore not assumed convergent, as you have asked in the comments.
Now, as you have said, this sequence $x_{n}$ will have a subsequence $x_{n_k}$ contained entirely either in $X$ or $Y$, because the sequence is infinite, so if you split it in two parts depending upon whether that term is in $X$ or in $Y$, on of the parts will be infinite .Suppose it is contained in $X$ (i.e. there are infinitely many terms of $x_n$ which are contained in $X$, and these we call as $x_{n_k}$). 
Now, $x_{n_k}$ is a subsequence of $x_n$, but it is contained in $X$. Since $X$ is compact, and $x_{n_k}$ is a sequence in $X$, there is a convergent subsequence $x_{n_{k_l}}$ of $x_{n_k}$, which converges in $X$ (to some point $x \in X$, if you like). Now, $x_{n_{k_l}}$ is a subsequence of $x_{n_k}$, which is a subsequence of $x_n$. So, $x_{n_{k_l}}$ is a convergent subsequence of $x_n$ (and not $x_{n_k}$, as written in your answer), which converges to a point $x \in X$, and therefore $x \in X \cup Y$. 
Now, do the same thing as above, but instead assume that the subsequence $x_{n_k}$ is in $Y$ rather than in $X$. The argument is exactly the same, and you could write it out for practice if you like.
Therefore, $X \cup Y$ is compact.
A: Your proof is fine with the slight modification I noted in the comments.
You need to show that $X\cup Y$ is compact. This means that you need to show that every sequence in $X\cup Y$ has a convergent subsequence, so you fix $(x_n)$ in $X\cup Y$. The goal is to now find a subsequence of $(x_n)$ which converges.
As you noted, there is a subsequence of $(x_n)$ which lies entirely in one of the two spaces. Let's assume without loss of generality that $(x_{n_k})$ is a subsequence of $(x_n)$ in $X$. Then, by the compactness of $X$, the sequence $(x_{n_k})$ has a convergent subsequence in $X$. Hence there is a subsequence $(x_{n_{k_j}})$ of $(x_{n_k})$ such that $(x_{n_{k_j}})$ converges to an element in $X$. Since $(x_{n_{k_j}})$ is a subsequence of our original sequence $(x_n)$ which converges to a point in $X\subseteq X\cup Y$, then we are done. Therefore $X\cup Y$ is compact.

It was important to add this second subsequence because it isn't true that $(x_{n_k})$ will necessarily converge to something. Compactness only tells us that a subsequence will converge.
Also, in regards to your question about beginning with $x_n\to x$, the answer is no. The definition of compactness says that every sequence has a convergent subsequence. We can't assume our sequence already converges.
A: Let $A=\{n: x_n\in X\}$ and $B=\{n: x_n\in Y\}.$ At least one of $A,B$ is an infinite set. 
If $A$ is infinite let $A=\{f(n):N\in\Bbb N\}$ where $f(n)<f(n+1).$  The sequence $\sigma=(x_{f(n)})_{n\in \Bbb N}$ is a sub-sequence of $(x_n)_{n\in\Bbb N}.$ 
All of the entries of $\sigma$ belong to $X$ so $\sigma$ has a sub-sequence $\tau$ converging to some $x\in X.$ Now $\tau$ is also a sub-sequence of $(x_n)_{n\in \Bbb N}$ and of course $x\in X\cup Y.$ 
Similarly if $B$ is infinite.
