Understanding a real analysis proof and concept: If $A$ is compact subset of $X$, then $f(A)$ is a compact set 
It seems to me that this proof does not prove "If $A$ is compact subset of $X$, then $f(A)$ is a compact set," but rather that statement: If $A\subset X$ is compact relative to $X$, then $f(A)$ is a compact set relative to $Y$. The cover $\{U_a\}$ of $f(A)$ is only required to be open relative to $Y$. The fact that $f$ is continuous only allows the conclusion that $f^{-1}(U_\alpha)$ is open relative to $X$, not that $f^{-1}(U_\alpha)$ is open in the context of the entire real line. Can you please help me flesh this out? I am having trouble grasping the subtleties.
Prior to this proof, the author gives a proof of the following fact: if a set is compact, then it is closed and bounded. But the proof the author gives is in the context of all of $\mathbb{R}$. Am I correct to believe that I cannot combine this fact with the previously discussed theorem to conclude $f(A)$ is closed and bounded? Can I really online conclude  $f(A)$ is closed and bounded relative to $Y$? What does it mean to have a set be bounded relative to another set?
 A: The Heine-Borel theorem about closedness and boundedness refers to a subset being considered as closed in all of $\Bbb R$. Boundedness is what we might call “absolute”, since it is a property that is invariant under regarding the same set in different subspaces. For instance $(0,1)$ is not compact, yet it is a closed subspace of itself. The closedness must be considered in $\Bbb R$.
Very importantly, compactness is also absolute. Given a topological space $Z$ and any subspace $W$ of $Z$, a set $A\subset W$ is compact in $Z$ iff. it is compact in $W$. So when you write ‘compactness relative to…’, that relativity does not actually matter (but it does for many topological concepts, so beware!).
Compactness is absolute because:

If $A$ is compact in $Z$, then it is compact in $W$. Proof: an open cover of $A$ in $W$ is precisely a cover of $A$ by sets $\{U_\alpha\cap W\}$ where the $U_\bullet$ are open in $Z$. But then $\{U_\alpha\}$ is an open cover of $A$ in $Z$, so there is a finite subcover $\{U_i\}_{i=1}^n. But $A\subset W$ means $$\{U_i\cap W\}_{i=1}^n$ is still an open cover of $A$ in $W$, and this is a finite subcover of the original cover. Thus $A$ is compact in $W$.

I recommend you prove the converse: that $A$’s compactness in $W$ implies its compactness in $Z$.
