Prob. 1 (a), Sec. 24, in Munkres' TOPOLOGY, 2nd ed: Is removal of a single point each from two homeomorphic spaces still leaves them homeomorphic? Here is  Prob. 1 (a), Sec. 24, in the book Topology by James R. Munkres, 2nd edition:

Show that no two of the spaces $(0, 1)$, $(0, 1]$, and $[0, 1]$ are homeomorphic. [Hint: What happens if you remove a point from each of these spaces?]

All three of these spaces, being convex subsets of the linear continuum  $\mathbb{R}$,  are of course connected. I know that removing any point from $(0, 1)$ leaves it disconnected; removing the point $1$ from $(0, 1]$ still leaves it connected; and removing either or both of the points $0$ and $1$ from $[0, 1]$ still leaves it connected.
Now my question is as follows:

Let $X$ and $Y$ be topological spaces; let $a \in X$ and $b \in Y$; and let $f \colon X \to Y$ be a homeomorphism (i.e. a bijective continuous mapping with a continuous inverse). Let $X^\prime \colon= X \setminus \{ \ a \ \}$, and let $Y^\prime \colon= Y \setminus \{ \ b \ \}$. Then how to show that $X^\prime$ and $Y^\prime$, with their respective subspace topologies, are still homeomorphic?
If $f(a) = b$, then perhaps this is easier to show. But what if $f(a) \neq b$?

 A: As other noted $X\backslash\{x\}$ does not have to be homeomorphic to $Y\backslash\{y\}$ even when $X\simeq Y$. Both $x,y$ points have to be carefuly chosen for that to hold. What is true is the following:

Lemma. Let $f:X\to Y$ be a homeomorphism. Then for any $x\in X$ we have a homeomorphism $g:X\backslash\{x\}\to Y\backslash\{f(x)\}$ given by $g(x)=f(x)$.

Proof. $g$ is obviously a well defined continuous function. It is easy to see that
$$h:Y\backslash\{f(x)\}\to X\backslash\{x\}$$
$$h(x)=f^{-1}(x)$$
is a well defined continuous inverse of $g$. $\Box$
Expanding on the original problem:

Definition. Let $X$ be a connected topological space. A point $x\in X$ is called a cut-point if $X\backslash\{x\}$ is not connected. Denote by $\text{cut}(X)$ the set of all cut-points of $X$.

With that we have

Lemma. Let $X,Y$ be two connected spaces and $f:X\to Y$ a homeomorphism. Then $f(\text{cut}(X))=\text{cut}(Y)$. In particular $\text{cut}(X)$ is equinumerous (even homeomorphic with subspace topology) with $\text{cut}(Y)$.

Proof. Consider a cut-point $x\in X$. By definition $X=U\cup V\cup\{x\}$ where $U, V\subseteq X\backslash\{x\}$ are both open, nonempty and disjoint subsets of $X\backslash\{x\}$. Since $f$ is a bijection then
$$Y=f(U)\cup f(V)\cup\{f(x)\}$$
and since $f:X\backslash\{x\}\to\ Y\backslash\{f(x)\}$ is a homeomorphism then $f(U),f(V)\subseteq Y\backslash\{f(x)\}$ are open, nonempty and disjoint. Thus $f(x)$ is a cut-point in $Y$. In particular $f(\text{cut}(X))\subseteq\text{cut}(Y)$. The other inclusion holds by applying the first part of the proof to $f^{-1}$:
$$f^{-1}(\text{cut}(Y))\subseteq \text{cut}(X)$$
and thus by applying $f$ to both sides we obtain
$$\text{cut}(Y)\subseteq f(\text{cut}(X))$$
which completes the proof. $\Box$
The lemma implies the obvious

Corollary. Let $f:X\to Y$ be a homeomorphism. Then $f(X\backslash\text{cut}(X))=Y\backslash\text{cut}(Y)$. In particular $X\backslash\text{cut}(X)$ is equinumerous (even homeomorphic with subspace topology) with $Y\backslash\text{cut}(Y)$.

Now back to the original problem:

Show that no two of the spaces $X=(0,1)$, $Y=(0,1]$, $Z=[0,1]$ are homeomorphic. 

Indeed
$$X\backslash\text{cut}(X)=\emptyset$$
$$Y\backslash\text{cut}(Y)=\{1\}$$
$$Z\backslash\text{cut}(Z)=\{0, 1\}$$
are not pairwise equinumerous. Thus by the corollary no two of them can be homeomorphic.
A: The bulk of the argument in proving that $(0,1)$ and $(0,1]$ are not homeomorphic is exactly that if two spaces are homeomorphic, removing one point from each space may not produce homeomorphic spaces.
In some cases it can happen: if you remove any two points from $\mathbb{R}$, the resulting spaces are homeomorphic, but this is because for each $a$ and $b$ in $\mathbb{R}$ there exists a homeomorphism $\mathbb{R}\to\mathbb{R}$ mapping $a$ to $b$. But this is a very particular case and doesn't work for any pair of spaces.
Indeed, it is easy to see that, if $f\colon X\to Y$ is a homeomorphism and $a\in X$, then $f$ induces a homeomorphism between $X\setminus\{a\}$ and $Y\setminus\{f(a)\}$: restrictions of continuous maps are continuous.
So, suppose $f\colon(0,1)\to(0,1]$ is a homeomorphism. If $f(a)=1$ (and such $a\in(0,1)$ exists), then $(0,1)\setminus\{a\}$ would be homeomorphic to $(0,1]\setminus\{1\}=(0,1)$, which is a contradiction, because the domain is disconnected, while the codomain is connected. Hence there is no homeomorphism $(0,1)\to(0,1]$.
More generally, if $f\colon X\to Y$ is a homeomorphism and $A\subseteq X$, then $f$ induces a homeomorphism between $X\setminus A$ and $Y\setminus f(A)$. So we can prove $(0,1)$ is not homeomorphic to $[0,1]$ by assuming $f$ is a homeomorphism, taking $f(a)=0$, $f(b)=1$ and getting the contradiction that $(0,1)\setminus\{a,b\}$ is homeomorphic to $(0,1)$.
A: It may not be the case that $X'$ and $Y'$ are homeomorphic. It depends on which points you remove.  For instance if $X = Y = \{(0,1)\} \cup \{2\}$ are endowed with the subspace topology.  Clearly $X$ and $Y$ are homeomorphic but if I remove $\{2\}$ from $X$ and $\frac{1}{2}$ from $Y$, then $X'$ and $Y'$ are not homeomorphic as $X'$ is connected and $Y'$ is not. 
If $f(a) = f(b)$, then we do have $X'$ and $Y'$ being homeomorphic. This is the case because restricting a continuous function to a subset is still a continuous function. So if $f$ is the homeomorphism between $X$ and $Y$, and $f|_{X'}$ is a continuous bijection onto $Y'$ and has $f^{-1}|_{Y'}$ as its inverse.    
A: Definitely not.  Any space is homeomorphic to itself via the identity map, so this would imply that for any space $X$ and any points $x, y \in X$, the spaces $X - \{x\}$ and $Y - \{y\}$ are homeomorphic.  You can look at a one manifold with boundary as a counterexample.  If you take the space $(0,1]$, removing $1$ gives you a different space than removing anything else.
If you assume that $f(a) = b$ then this is true.  If you think of $X$ and $Y$ as the "same" space by identifying them with $f$, then this comes down to saying that $X$ minus any point is homeomorphic to itself.
A: Others have already shown that the general fact you state cannot be true; it would imply that for any space $X$, $X\setminus\{x\}$ and $X\setminus\{x'\}$ would always be homeomorphic.
But you have to keep in mind the structure of the proof : Suppose $f: X \to Y$ is a homeomorphism, we derive a contradiction from that. So we start with a concrete and given homeomorphism and then use the lemma:

Lemma:
Suppose $f:X \to Y$ is a homeomorphism between $X$ and $Y$. For any $a \in X$, we have that $X \setminus \{a\}$ is homeomorphic to $Y \setminus \{f(a)\}$.

Proof: just use $g : X\setminus\{a\} \to Y \setminus \{f(a)\}$ where $g$ is the restriction of $f$ (on both domain and codomain simultaneously). $g$ is continuous when $f$ is by standard properties of the subspace topology. Also $g$ is a bijection when $f$ is. And the inverse of $f$ is continuous by definition and this inverse restricted to this domain/codomain is exactly the inverse of $g$. So $g$ is also a continuous bijection with continuous inverse.
As an application:
If $f$ were a bijection between $X=(0,1)$ and $Y= [0,1)$ or $Y=[0,1]$, for some $a \in X$ we have $f(a) = 0$. Now the lemma says that $X\setminus \{a\} \simeq Y \setminus \{0\}$. Contradiction as the first space is always disconnected (regardless of $a$) and the second is connected (in both cases). So they cannot be homeomorphic, and this contradiction shows that $f$ could not exist, and $(0,1)$ is not homeomorphic to either of the other two.
Suppose $f$ is a homeomorphism between $[0,1)$ and $[0,1]$.
If $f(0) =1$, then the lemma says that $$(0,1) = [0,1)\setminus \{0\} \simeq [0,1] \setminus \{1\} = [0,1)$$ which we ruled out above. And if $f(0) = 0$ we get $$(0,1) = [0,1)\setminus \{0\} \simeq (0,1] \simeq [0,1)$$ (the latter by $h(x) = 1-x$) and again we find a situation we ruled out. So finally, $f(0) = b$ with $0 < b < 1$ but then the lemma says $$(0,1) \simeq [0,b) \cup (b,1]$$
which cannot be, by connectedness again (left is connected, right is not).
The last can be done more efficiently:
The lemma has the following corollary : (recall that a cutpoint of a connected space $X$ is a point $x \in X$ such that $X\setminus\{x\}$ is not connected, other points of $X$ are called non-cutpoints, so then $X\setminus\{x\}$ is still connected)

Corollary:
Let $f:X \to Y$ be a homeomorphism between connected spaces $X,Y$. Then if $x$ is a cutpoint of $X$, then $f(x)$ is a cutpoint of $Y$ and if $x$ is a non-cutpoint of $X$, then $f(x)$ is a non-cutpoint of $Y$.

The proof is immediate from the lemma. In particular, $X$ and $Y$ have the same number of cutpoints and non-cutpoints.
$[0,1]$ has $2$ non-cutpoints, $[0,1)$ has $1$, $(0,1)$ has none (i.e. all points are cutpoints). So no pair among them can be homeomorphic.
