Define a bijection Okay so I know that I asked this already but I want to ask how much progress I have made. so the question is
Construct a bijection between $[1,2]$ and $[3,5)$
So I have:
\begin{equation}
f(x) = \left \{ \begin{array}{ll} 3 + 2^{1-n} & \textrm{ if } x = 1+2^{1-n} \textrm{ for }  n \in \mathbb{N} \\
              2x+1 & \textrm{ if }  x \neq 1+2^{1-n} \end{array} \right.
\end{equation}
Sorry about the formatting, but is this correct?
Edit: the linked post is mine. I'm just asking since I didn't get a really satisfactory answer if the solution I have is going towards the right direction.
Edit2: changing the equation to what improvements I'm getting, still any feedback is helpful. Thanks!

The function $f$ is onto: 
Case 1
Let $y \in [3,5) $ be of the form: $3 + 2^{1-n}$ for some $n \in \mathbb{N}$. Then $x = 1 + 2^{1-n}$ is such that $f(x) = y$. In particular, if $n$ is such that $3 + 2^{1-n} \in [3,5)$ then $n \geq 0$. This in turn implies that $1 \leq 1 + 2^{1-n} \leq 2$.   
Case 2
Let $y \in [3,5) $ not be of the form: $3 + 2^{1-n}$ for some $n \in \mathbb{N}$. Then $x = (y-1)/2 \in [1,2]$ is such that $f(x) = y$. In particular if $y \in [3,5) $ then $(y-1)/2 \in [1,2]$. 
The function $f$ is inyective: 
Let $a,b \in [1,2]$ be such that $f(a) = y = f(b)$
Case 1
If $y \neq 3 + 2^{1-n}$ then $f(a) = 2a + 1 = 2b + 1 = f(b)$. It follows that $a = b$. 
Case 2
If $y =  3 + 2^{1-n}$ then $f(a) = 3 + 2^{1-n_a}$ and $f(b) =  3 + 2^{1-n_b}$ where $a = 1 + 2^{1-n_a}$ and $b = 1 + 2^{1-n_b}$ respectively. Then: 
\begin{equation}
\begin{aligned}
3 + 2^{1-n_a} = 3 + 2^{1-n_a} & \Leftrightarrow 2^{1-n_a} = 2^{1-n_a} \\ & \Leftrightarrow  log_2\left(2^{1-n_a}\right) = log_2\left(2^{1-n_b}\right) \\ & \Leftrightarrow n_a = n_b \\ & \Leftrightarrow a = b. 
\end{aligned}
\end{equation}
