$X,Y$ not homeomorphic if $X\backslash x$ is disconnected for all $x\in X$ but $Y\backslash y$ is connected for some $y\in Y$ I have seen here on stack exchange (in the comments) a proof along the lines of:
$X\backslash x$ is disconnected for all $x\in X$ but $Y\backslash y$ is connected for some $y\in Y$. Therefore $X$ and $Y$ are not homeomorphic.
Explicitly, how does this show the nonexistence of a homeomorphism between $X$ and $Y$?
A homeomorphism is a bijective continuous function with continuous inverse.
A continuous function's inverse maps open sets to open sets.
A connected space is the union of disjoint open sets.
Prior attempts: Write out the definitions, then ... ?
 A: Hint: Suppose that there exists a homeomorphism $f : X \to Y$ and let $$x := f^{-1}(y).$$ Can you show that $X \setminus \{x\}$ must be homeomorphic to $Y \setminus \{y\}$? What can be said about the continuous image of a connected space? 
A: There are two relevant facts:


*

*Continuous functions whose domains are restricted are continuous.

*Continuous functions take connected sets to connected sets.


Can you use these facts to prove that the circle is not homeomorphic to the line?
A: Here explicitly:
Let $(X,\tau_X),(Y,\tau_Y)$ be the topological spaces $X,Y$ with their considered topologies $\tau_X,\tau_Y$.
Assume there is a homeomorphism $h: (X,\tau_X)\rightarrow(Y,\tau_Y)$, while $Y\setminus \{y\}$ is connected but $X\setminus \{x\}$ is disconneted with $x = h^{-1}(y)$.
$X\setminus \{x\}$ disconnected means you can split


*

*$X\setminus \{x\} = A\cup B$ where $A\neq \emptyset$ and $B\neq \emptyset$ and $A,B \in \tau_{X\setminus \{x\}}$, which means they are open and closed wrt. $\tau_{X\setminus \{x\}}$ - the topology on $X\setminus \{x\}$ induced by $\tau_X$.

*Since $h$ is a homeomorphism, it follows that $Y\setminus \{y\} = h(A) \cup h(B)$ and $h(A)$ and $h(B)$ are nonempty and they are both open and closed in $\tau_{Y\setminus \{y\}}$ - the topology on $Y\setminus \{y\}$ induced by $\tau_Y$. 


Hence, $Y\setminus \{y\}$ is now disconnected, which is a contradiction to the assumption that it is not.
