I’m going to assume that Cantor set here refers to the standard middle-thirds Cantor set $C$ described here. It can be described as the set of real numbers in $[0,1]$ having ternary expansions using only the digits $0$ and $2$, i.e., real numbers of the form $$\sum_{n=1}^\infty \frac{a_n}{3^n},$$ where each $a_n$ is either $0$ or $2$.
For each positive integer $n$ let $D_n = \{0,1\}$ with the discrete topology, and let $$X = \prod_{n=1}^\infty D_n$$ with the product topology. Elements of $X$ are infinite sequences of $0$’s and $1$’s, so $(0,0,0,1)$ and $(0,1,1,1,1,1,1)$ are not elements of $X$; if you pad these with an infinite string of $0$’s to get $(0,0,0,1,0,0,0,0,\dots)$ and $(0,1,1,1,1,1,1,0,0,0,0,\dots)$, however, you do get points of $X$. A more interesting point of $X$ is the sequence $(p_n)_n$, where $p_n = 1$ if $n$ is prime, and $p_n = 0$ if $n$ is not prime.
Your problem is to show that $C$, with the topology that it inherits from $\mathbb{R}$, is homeomorphic to $X$. To do that, you must find a bijection $h:C\to D$ such that both $h$ and $h^{-1}$ are continuous. The suggestion that you found is to let $$h\left(\sum_{n=1}^\infty\frac{a_n}{3^n}\right) = \left(\frac{a_1}2,\frac{a_2}2,\frac{a_3}2,\dots\right).$$ Note that $$\frac{a_n}2 = \begin{cases}0,&\text{if }a_n=0\\1,&\text{if }a_n=2,\end{cases}$$ so this really does define a point in $X$. This really is a bijection: if $b = (b_n)_n \in X$, $$h^{-1}(b) = \sum_{n=1}^\infty\frac{2b_n}{3^n}.$$
Remember that $a_n-b_n\in\{-2,0,2\}$.
Suppose that
$$
\sum_{n=1}^\infty\frac{a_n-b_n}{3^n}\gtrless0\tag{1}
$$
$(1)$ happens if and only if, for the smallest $n_0$ so that $a_{n_0}\not=b_{n_0}$, it is the case that $a_{n_0}\gtrless b_{n_0}$.
The claim above is true because
$$
\text{If }a_{n_0}>b_{n_0}\text{ then }\sum_{n=1}^\infty\frac{a_n-b_n}{3^n}\ge\frac2{3^{n_0}}-\sum_{n>n_0}\frac2{3^n}=\frac1{3^{n_0}}\tag{2}
$$
$$
\text{If }a_{n_0}<b_{n_0}\text{ then }\sum_{n=1}^\infty\frac{a_n-b_n}{3^n}\le-\frac2{3^{n_0}}+\sum_{n>n_0}\frac2{3^n}=-\frac1{3^{n_0}}\tag{3}
$$
If for the smallest $n_0$ so that $a_{n_0}\not=b_{n_0}$, it is the case that $a_{n_0}\gtrless b_{n_0}$, then
$$
\sum_{n=1}^\infty\frac{a_n-b_n}{2^{n+1}}\gtreqless0\tag{4}
$$
This is because
$$
\text{If }a_{n_0}>b_{n_0}\text{ then }\sum_{n=1}^\infty\frac{a_n-b_n}{2^{n+1}}\ge\frac1{2^{n_0}}-\sum_{n>n_0}\frac1{2^n}=0\tag{5}
$$
$$
\text{If }a_{n_0}<b_{n_0}\text{ then }\sum_{n=1}^\infty\frac{a_n-b_n}{2^{n+1}}\le-\frac1{2^{n_0}}+\sum_{n>n_0}\frac1{2^n}=0\tag{6}
$$
So, if $x\gtrless y$, $F(x)\gtreqless F(y)$. We can't get strict increase since $F$ is constant on all the "middle-thirds" intervals.
Best Answer
I hope the following procedure is "systematic" enough.
Start with $x\in [0,1]$. Define $a_1$ to be the greatest number in $\{ 0,1,2\}$ such that $\frac{a_1}3\leq x$; so $a_1=0$ if $x\in [0,1/3)$, $a_1=1$ if $x\in [1/3,2/3)$ and $a_1=2$ if $x\in [2/3,1]$. In each case you have $$\frac{a_1}3\leq x\leq \frac{a_1}{3}+\frac13\,\cdot$$ Assuming $a_1,\dots ,a_{n-1}$ have already been found (for some $n\geq 2$) with $$\sum_{k=1}^{n-1}\frac{a_k}{3^k}\leq x\leq \sum_{k=1}^{n-1}\frac{a_k}{3^k}+\frac{1}{3^{n-1}}\, ,$$ define $a_n$ to be the greatest number in $\{ 0,1,2\}$ such that $\sum_{k=1}^{n-1}\frac{a_k}{3^k}+\frac{a_n}{3^n}\leq x$. Then $$\sum_{k=1}^n\frac{a_k}{3^k}\leq x\leq \sum_{k=1}^{n}\frac{a_k}{3^k}+\frac{1}{3^{n}}\cdot $$ Indeed, if $a_n=0$ or $1$ then $a_n+1$ is still in $\{ 0,1,2\}$, so by the definition of $a_n$ you have in fact $x<\sum_{k=1}^{n-1} \frac{a_k}{3^k}+\frac{a_n+1}{3^n}=\sum_{k=1}^n\frac{a_k}{3^k}+\frac{1}{3^n}$; and if $a_n=2$ then you may write (by the induction hypothesis) $x\leq \sum_{k=1}^{n-1}\frac{a_k}{3^k}+\frac{1}{3^{n-1}}=\sum_{k=1}^{n-1} \frac{a_k}{3^k}+\frac{2}{3^{n}}+\frac{1}{3^n}=\sum_{k=1}^n\frac{a_k}{3^k}+\frac1{3^n}\cdot$
So, constructing your sequence in this way, you obviously get $x=\sum_{k=1}^ \infty \frac{a_k}{3^k}\cdot$
As you know, the ternary expansion is not necessarily unique. If you start with a number $x$ of the form $x=\sum_{k=1}^N\frac{b_k}{3^k}$ (finite sum), then the procedure gives you $a_1=b_1, \dots , a_N=b_N$ and $a_k=0$ for all $k>N$.
As for your second question, you already have a nice answer.