Introductory problem to understand Schroeder-Bernstein Theorem 
Consider $A=[0,1]$ and $B=[0,1)$ and injections $f(x) = \frac13x$ from $A$ to $B$ and $g(x) =x$ from $B$ to $A$. Construct a bijection $h$ from $A$ to $B$ such that on some points of $A$, $h(x) = f(x)$ and for the other points $h(x) = g^{-1}(x).$

It seems that $f(x) = \frac13x$ is a bijection from $A \to B$ for the points $[0, \frac13]? $ If I understood the question correctly (I doubt I did...) they would want me to construct a bijection for the rest of the points? I’m reading ”topology through inquiry” and this was a problem from the book. Also I’m not sure if they mean the inverse function by $g^{-1}(x)$ or the preimage?
 A: I'm answering this question because it's been a while since I studied the Schroeder-Bernstein Theorem, it should be a fun review for me.
Here is a constructive proof of the Schroeder-Bernstein Theorem, page 1-9.
Given injective funtions $f:A \rightarrow B$ and  $g:B\rightarrow A$, in your case $f(x)=\frac{1}{3} x$ and $g(x)=x$ with $A=[0,1]$ and $B=[0,1)$.
Word for word from the document: let $B_1=B\backslash f(A)=[0,1)\backslash[0,\frac{1}{3}]= \left( \frac{1}{3},1 \right).$
If $B_k \subset B$ is defined for some $k \in \mathbb{N}$, let $A_k=g(B_k)$ and $B_{k+1}=f(A_k)$, thus defining the sets inductively for all $k \in \mathbb{N}$.
Define $\tilde{A}= \cup_{k \in \mathbb{N}} A_k$
Then the sought after bijective function is
$$ h(x) =
\begin{cases}
g^{-1}(x),  & x \in \tilde{A} \\
f(x), & x \in A\backslash \tilde{A}
\end{cases}$$
$A_1 = g(B_1) = \left( \frac{1}{3},1\right)$
$B_2=f(A_1)=\left(\frac{1}{9},\frac{1}{3}\right)$
$A_2=g(B_2)= \left(\frac{1}{9},\frac{1}{3}\right)$
$B_3 =f(A_2)=\left(\frac{1}{27},\frac{1}{9}\right)$
$A_3 = g(B_3)= \left(\frac{1}{27},\frac{1}{9}\right)$
$\vdots$
$B_k=\left(\frac{1}{3^k},\frac{1}{3^{k-1}}\right)$
$A_k = B_k = \left(\frac{1}{3^k},\frac{1}{3^{k-1}}\right)$ inductively. From which $\tilde{A} = \cdots \cup \left(\frac{1}{3^k},\frac{1}{3^{k-1}}\right)\cup \cdots \cup \left(\frac{1}{3^3},\frac{1}{3^2}\right) \cup \left(\frac{1}{3^2},\frac{1}{3}\right) \cup \left(\frac{1}{3},1\right)=(0,1)\backslash \left\lbrace\frac{1}{3^k}\Bigg|k\geq 1\right\rbrace$ and
$$ h(x) =
\begin{cases}
x,  & x \in (0,1)\backslash \left\lbrace\frac{1}{3^k}\Bigg|k\geq 1\right\rbrace \\
\frac{1}{3}x, & x \in \left\lbrace\frac{1}{3^k}\Bigg|k\geq0\right\rbrace\cup\{0\}
\end{cases}$$
To illustrate the bijection under $h$
$$0 \mapsto 0$$
$$\frac{1}{3^k} \mapsto \frac{1}{3^{k+1}} \text{for $k\geq 0$}$$
while $h$ fixes all other elements in $[0,1]$.
For more details on why $h(x)$ in general using this method is always well-defined, injective and surjective is described in the remainder of the proof.
Hope this helps!
A: You’re clearly going to have to let $h(x)=g^{-1}(x)=x$ for $x\in\left(\frac13,1\right)$, because those points aren’t in the range of $f$. After that you have to figure out how to piece together $f$ and $g^{-1}$ to get a bijection from $\left[0,\frac13\right]\cup\{1\}$ to itself.
HINT: Let $A=\left\{\frac1{3^n}:n\in\Bbb Z^+\right\}$. Note that $f[A]=A\setminus\left\{\frac13\right\}$. Let $h\upharpoonright A=f\upharpoonright A$ and, as already suggested above, $h\upharpoonright\left(\frac13,1\right)=g^{-1}\upharpoonright\left(\frac13,1\right)$. How can you use $f$ and/or $g^{-1}$ to complete the definition of $h$ by defining $h\upharpoonright\left(\left[0,\frac13\right]\cup\{1\}\right)$?
