Prove that the union of any two compact subsets of the reals is compact.
If $\displaystyle A$ and $\displaystyle B$ are compact sets then there is $\displaystyle R>0$ so that $\displaystyle A,B$ are contained in $\displaystyle \{ x \in \mathbb{R} : |x| < R \}$. But then $\displaystyle A\cup B$ is contained in $\displaystyle \{ x \in \mathbb{R} : |x| < R\}$. Therefore, $\displaystyle A\cup B$ is closed. Also the union of two closed sets is closed therefore $\displaystyle A\cup B$ is closed. Thus, $\displaystyle A\cup B$ is compact.
Hello,
Another method is to use the Heine-Borel theorem (note that $\displaystyle \mathbb{R}$ is a separated space) :
If A is a compact, then there exists a finite family of subsets $\displaystyle (A_i)_{i \in I}$, where I is a finite set, such that $\displaystyle A \subseteq \bigcup_{i \in I} A_i$
Similarly, $\displaystyle B \subseteq \bigcup_{j \in J} A_j$, where J is a finite set.
Then $\displaystyle A \cup B \subseteq \bigcup_{k \in I \cup J} A_k$
and $\displaystyle I \cup J$ is finite.
Thus $\displaystyle A \cup B$ is a compact set.