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.
You don't need a metric space. A topological space $(X,\tau)$ is sufficient.
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: