Prove that $[a,b]\cong[c,d].$ 
Let $a,b,c,d$ be real numbers with $a<b$ and $c<d$. Prove that $$[a,b]\cong[c,d].$$

I know that I need to show that $[a,b]\cong[0,1]$ and $[c,d]\cong [0,1]$ then, by the transitive propety of homeomorphisms we will have that $[a,b]\cong [c,d]$.
Define $f:[0,1]\to [a,b]$ by $$f(x)=a(1-x)+bx$$ then clearly $f$ is a bijection. Now also, using the surjective property of $f$, we know that $f^{-1}([a,b])=[0,1]$. Since $[0,1]$ and $[a,b]$ are both closed, we therefore have that $f$ is continuous. And since $f$ is a bijection,  $f^{-1}$ is also continuous.
That is, $[a,b]\cong[0,1]$.
Using the exact same argument and replacing $a$ and $b$ with $c$ and $d$ respectively, we find that $[c,d]\cong [0,1]$.
That is $$[a,b]\cong [c,d]$$
Is this correct?
 A: It is true that $f(x)=a(1-x)+bx$ defines a bijection from $[0,1]$ to $[a,b]$. Beware that $f^{-1}([a,b])=[0,1]$ doesn't show continuity of $f$.
The function $f$ is continuous for the simple reason that $f(x)=a+(b-a)x$ and each function $x\mapsto x+k$ and $x\mapsto hx$ is continuous.
Also, the mere fact that $f$ is continuous and bijective doesn't imply in general that $f^{-1}$ is continuous. In this case it is true because $[0,1]$ is compact and $[a,b]$ is Hausdorff, but it would be like using a sledgehammer. It's simpler to notice that
$$
f^{-1}(y)=\frac{y-a}{b-a}
$$
which is obviously continuous for the same reason as before.
Now you can conclude by composing $f^{-1}\colon[a,b]\to[0,1]$ with $g\colon[0,1]\to [c,d]$ defined similarly and using the fact that $g\circ f^{-1}$ and
$$
(g\circ f^{-1})^{-1}=f\circ g^{-1}
$$
are continuous as compositions of continuous functions.
A: To demonstrate $f$ is continuous, you'll have to show that the preimage of any closed set in $\mathbb R$ under $f$ is closed. The function $f$ you have defined is also not quite what you want. I notice someone else already noted that in a comment to your question, though.
A: \begin{align}
  & f:[a,b]\to [c,d] \\
\\ 
 & f(x)=c+(d-c)\left( \frac{x-a}{b-a} \right) \\ 
\\
& f(a)=c \quad,\quad f(b)=d
\\
\\
 & f({{x}_{1}})=f({{x}_{2}})\xrightarrow{?}\,{{x}_{1}}={{x}_{2}} \\ 
\\
 & c+(d-c)\left( \frac{{{x}_{1}}-a}{b-a} \right)=c+(d-c)\left( \frac{{{x}_{2}}-a}{b-a} \right) \\ 
\\
 & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{{x}_{1}}={{x}_{2}} \\ 
\end{align}
$$$$
