If $X$ is compact and space $X{/}K$ the contraction of $K$ to a point.Prove that $X{/}K$ is the compactification of $X-K$ If $X$ be Hausdorff and compact and $K\subset X$ compact, and   $X{/}K$ the contraction of $K$ to a point.Prove that $X{/}K$ is the compactification of $X-K$.
I have been tried different ways of show that both are homeomorphic.
$\pi:X{/}K-\{[K]\} \longrightarrow X-K$ given by $\pi(x)=x$ and see that is a homeomorphism, unfortunelly I can´t look that the function is continous.
$\pi:X{/}K  \longrightarrow (X-K) \cup \lbrace \infty \rbrace$ given by $\pi(x)=x$ if $x\in [x]$ or $\pi(x)=\infty$ if $x\in [k]$
but at this time is hard show that $\pi$ is a homeomorphism.
Any advice of how I should prove that?
 A: The result isn’t quite correct. Let $X=[0,1]\cup\{2\}$ with the topology that it inherits from $\Bbb R$, and let $K=[0,1]$. Then $X$ is compact and Hausdorff, and $K$ is compact. But $X\setminus K=\{2\}$ is also compact, so it does not have a one-point compactification. What is true is that $X/K$ is homeomorphic to the Alexandroff extension of $X\setminus K$, which is the one-point compactification if and only if $X\setminus K$ is not compact.
For convenience let $Y=X\setminus K$. Let $\tau$ be the topology on the Alexandroff extension $Y\cup\{\infty\}$. $X$ is Hausdorff, so $K$ is closed in $X$, and $Y$ is therefore open in $X$. Thus, a subset $U$ of $Y$ is open in $Y$ if and only if it is open in $X$. This means that $\tau$ consists of all open subsets of $Y$ together with all sets of the form $\{\infty\}\cup(Y\setminus C)$ such that $C$ is a compact subset of $Y$.
Let $\pi:X\to X/K$ be the quotient map, let $y\in K$, and define
$$h:Y\cup\{\infty\}\to X/K:x\mapsto\begin{cases}
\pi(x),&\text{if }x\in Y\\
\pi(y),&\text{if }x=\infty\,;
\end{cases}$$
we want to show that $h$ is a homeomorphism, i.e., that it is a continuous, open bijection. It’s easy to check that it’s a bijection. I’ll show that it’s open and leave it to you for now to go on and show that it is also continuous.
Let $U\in\tau$. If $\infty\notin U$, then $h[U]=\pi[U]$, which is open in $X/K$ because $U=\pi^{-1}\big[\pi[U]\big]$ is open in $X$. If $\infty\in U$, then $U=\{\infty\}\cup(Y\setminus C)$ for some compact $C\subseteq Y$, so
$$h[U]=\{\pi(y)\}\cup\pi[Y\setminus C]=\pi[K\cup(Y\setminus C)]=\pi[X\setminus C]\,,$$
and $X\setminus C=\pi^{-1}\big[\pi[X\setminus C]\big]$ is open in $X$, so again $h[U]$ is open in $X$, and we’ve now shown that $h$ is an open map.
