Let $U\subseteq X$ be a an open set of a topological space $X$ and $V\subset\subset U$ an open, compactly contained set (i.e, $\bar{V}$ is compact and $\bar{V}\subset U$).
When we say the closure of $V$ is compact, is it relative to the relative topology of $U$ or the topology of the whole space?
It doesn't matter, since $U$ is open. Any open cover relative to $U$ is also an open cover relative to $X$, and any open cover relative to $X$ can be converted to an open cover relative to $U$ by taking intersections. So $\overline{V}$ is compact relative to $U$ if and only if it is compact relative to $X$.
It is very important that $U$ is open here; this fails completely when $U$ is not open.