If $A$ is closed and $B$ is compact, prove $A\cap B$ is compact Prove that if $A$ and $B$ are subsets of a metric space such that $A$ is closed and $B$ is compact, then $A\cap B$ is compact.
I'm trying to prove first that $A\cap B$ is closed and go from there. The question doesn't explicitly state that the metric space has the Heine Borel property so I think I would be incorrect in assuming so to solve the problem.
 A: You have a good idea of going for the fact that $A \cap B$ is closed. 
$A \cap B$ is closed in the subspace topology of $B$, since $A$ is closed. Since $B$ is compact, we have that $A \cap B$ is compact: this is due to the fact that a closed set inside a compact set is compact. 

If you know a little bit of general topology, you will realize that the above argument avoids using the fact that $B$ is closed, which is not valid in a general topological space (compactness and Hausdorffness can guarantee that). The argument is readily seen then to hold also for a general topological space.
Also, it may be a good exercise to keep careful track of what "topology level" (i.e., if we are on $X$ or $B$) each argument relies, and when this makes a difference or not.
A: You don't need a metric space. A topological space $(X,\tau)$ is sufficient.

Definition Let be $B\subset X$ and $(\mathcal O_i)_{i\in I}$ an open cover of $B$ with some index set $I$. $B$ is called compact if there exists $J\subset I$ finite such that $(\mathcal O_j)_{j\in J}$ is an open cover of $B$.

To prove that $A\cap B$ is compact, you have to consider an open cover $(\mathcal O_i)_{i\in I}$ of $A\cap B$. Next, $O:=X\setminus A$ is open, since $A$ is closed and $\{O\}\cup(\mathcal O_i)_{i\in I}$ is an open cover of $B$, since $$
B=(B\setminus A)\cup(A\cap B)\subset(X\setminus A)\cup(A\cap B)=O\cup(A\cap B)\subset O\cup\bigcup_{i\in I}\mathcal O_i
$$
Here the rest:

Since $B$ is compact, there exists an finite cover out of $\{O\}\cup (\mathcal O_i)_{i\in I}$. This implies two cases. Case 1: There exists $i_1,\ldots,i_k\in I$ such that $B\subset \bigcup_{n=1}^k \mathcal O_{i_n}$.Using $A\cap B\subset B$, we get $A\cap B\subset \bigcup_{n=1}^k \mathcal O_{i_n}$. Hence $(\mathcal O_{i_n})_{n=1}^k$ is a finite subcover of $A\cap B$.Case 2: There exists $i_1,\ldots,i_k\in I$ such that $B\subset O\cup\bigcup_{n=1}^k \mathcal O_{i_n}$.Using $A\cap B\subset B$, we get $A\cap B\subset O\cup\bigcup_{n=1}^k \mathcal O_{i_n}$. Since $(A\cap B)\cap O\subset A\cap (X\setminus A)=\emptyset$, we get further $A\cap B\subset\bigcup_{n=1}^k \mathcal O_{i_n}$. So $(\mathcal O_{i_n})_{n=1}^k$ is a finite subcover of $A\cap B$.Both cases imply the compactness of $A\cap B$.

