Definition: A set $A$ in $\mathbb{R}$ is compact if every sequence in $K$ has a subsequence that converges to a limit that is also in $K$.
I want to show that intersection of $A$ and $B$, and the union of $A$ and $B$ are compact following the definition above.
Let $A$ and $B$ be compact sets.
My idea for Union case is: Since every sequence in $A$ and $B$ has a subsequence that converges to limit in $A$ and $B$, it follows that the union of $A$ and $B$ contains every sequence of $A$ and $B$ that converges to some limit in the union of $A$ and $B$.
For intersection case, if its empty, then clearly it is compact.
It not empty, every element in intersection of $A$ and $B$ belongs to $A$ (or $B$).
After this, I am not sure how to continue arguing that every sequence has subsequence.
The intersection: suppose $A$ and $B$ are "compact" (sequentially compact, really). Let $(x_n)$ be a sequence in $A \cap B$. Then $(x_n)_n$ is a sequence in $A$ in particular, so it has a convergent subsequence $(x_{n_k})_k$ that converges to $a \in A$. But this subsequence is a sequence in $B$ as well, so has a convergent subsequence (subsubsequence) $(x_{n_{k_m}})_m$ with a limit $b$ in $B$ by assumption. But any subsequence of a convergent sequence has the same limit as the whole sequence so $a = b$ is in $A \cap B$, and we have a subsequence of $(x_n)$ that converges to a point in $A \cap B$.
If $(x_n)$ is a sequence in $A \cup B$, we only need to observe that there are infinitely many $n$ with $x_n$ in $A$ or infinitely many $n$ with $x_n \in B$ (or both). Then take the appropriate subsequence as the sequence to apply compactness to.