homeomorphism between union of intervals and reals 
Question:
Show that $\left ( 0,1 \right )$ and $\mathbb{R}$ are homeomorphic.
Proposition:If $a,b,c,d \in \mathbb{R}$, $a<b$ and $c<d$ then $\left ( a,b \right )$ is homeomorphic to $\left ( c,d \right )$.

For any point $x \in \mathbb{R}$, we have that $x \in \left ( c,d \right )$ where $c<d$
Hence, $\left ( 0,1 \right )$ is homeomorphic to $\mathbb{R}$
Now,

Question:
Show that $\left ( 0,1 \right ) \cup \left ( 2,3 \right )$ is not homeomorphic to $\mathbb{R}$.

$\textbf{Hint}$: any two points in $\mathbb{R}$ are joined by a continuous curve.
I'll like a hint as to the second question.
Any help is appreciated.
Thanks in advance.
 A: Let's go back to your first problem:

For any point $x \in \mathbb{R}$, we have that $x \in \left ( c,d \right )$ where $c<d$
Hence, $\left ( 0,1 \right )$ is homeomorphic to $\mathbb{R}$

One point that's confusing for a reader is that you say "hence" as if the second sentence follows from the first.  But the two don't seem to have much to do with each other.
The first statement looks like you've jumbled up the quantifiers.  You're asked to prove that for all $a$, $b$, $c$, and $d$ with $a<b$ and $c<d$, that $(a,b)$ is homeomorphic to $(c,d)$.  You assert that for all $x \in \mathbb{R}$, that there exist $c$ and $d$ such that $c<x<d$.  This is true, but it's not relevant to the problem.
First, try to show that $(0,1)$ is homeomorphic to $\mathbb{R}$.  Then, generalize your proof to show that $(a,b)$ is homeomorphic to $\mathbb{R}$, for any $a<b$.  This shows that $(a,b)$ is homeomorphic to $(c,d)$, by transitivity.
To look for a continuous, invertible map that sends $(0,1)$ to $(-\infty,\infty)$, think of rational functions.  Can you construct a function $f(x)$ which is monotone increasing on $(0,1)$, has $\lim_{x\to 0^+} f(x) =-\infty$, and $\lim_{x\to 1^-}f(x) = +\infty$?
A: I am not exactly sure what you did to prove the first part... But regarding your second question, $\mathbb{R}$ is connected, whereas $(0,1) \cup (2,3)$ is not, and homeomorphisms preserve connectedness.
A: Suppose you have a homeomorphism $\phi: (0,1) \cup (2,3) \to \mathbb{R}$. Take the points $x=\phi(0.5)$ and $y=\phi(2,3)$. Now have a continuous curve from $x$ to $y$, lets call it $\gamma: [0,1] \to \mathbb{R}$ (I think you can construct such a curve easily).
Hint: The pullback of the curve $\gamma'=\phi^{-1}(\gamma)$ is hence also a continuous curve in $(0,1) \cup (2,3)$ with certain endpoints. Does such a curve exist?
Another possibility/hint without curves: Make yourself clear that in $(0,1) \cup (2,3)$ the interval $(0,1)$ is open (as open interval) and closed (as complement of the open interval $(2,3)$). Assume you have a homeomorphism $\phi: (0,1) \cup (2,3) \to \mathbb{R}$, then $\phi( (0,1)) \subseteq \mathbb{R}$ is (since $\phi$ is a homeomorphism) a closed and open subset of $\mathbb{R}$. You might know all the subsets of $\mathbb{R}$ which are closed and open (hint: there are 2 such subsets). Take it from here (remember that images of non-empty sets are non-empty and a homeomorphism is also injective)!
