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}.$$
In decimal expansion, like in decimal notation, each digit represents a power of $10$, but to a negative power. So, for example, $0.812075$ represents the number
$8\times 10^{-1} + 1\times 10^{-2} + 2\times 10^{-3} + 0\times 10^{-4} + 7\times 10^{-5} + 5\times 10^{-6}$. The digits can be $0$, $1,\ldots,9$. There is a subtletly that some numbers have two decimal expansions: you can have either a “tail of $9$s” or a tail of $0$s: so $0.5$ is the same as $0.4999999\ldots$.
In ternary expansion, you do the same but with powers of $3$; so the “digits” can only be $0$, $1$, or $2$. In binary expansion, you use powers of $2$, and the “digits” can only be $0$ or $1$. As with decimal expansion, some numbers have two ternary expansions (tails of $2$s or tails of $0$s), and some have two binary expansions.
The Cantor set consists precisely of those numbers in $[0,1]$ which have at least one ternary expansion in which every digit is either a $0$ or a $2$.
So the domain of your function $F$ consists of numbers that are of the form
$$\sum_{i=1}^{\infty} a_n3^{-n},\qquad $a_i=0\text{ or }2\text{ for each }i.$$
So you take a number written in ternary notation using only $0$s and $2$s, and you turn it into a number written in binary notation by keeping every $0$ digit as a $0$, and turning every $2$-digit into a $1$.
That’s the function described. You get every possible number in $[0,1]$ this way, since any such number, after you write it in binary notation, comes from a number in the Cantor Set; which number? the one where all the positions with a $1$ in the “target” had a $2$.
Best Answer
The quoted argument is probably intended to be filled in as follows. Let $x\in[0,1]$; then $x$ has a binary expansion
$$x=\sum_{k\ge 1}\frac{b_k}{2^k}\;,$$
where each $b_k\in\{0,1\}$. The sequence $\langle b_k:k\in\Bbb Z^+\rangle$ now defines a nest of closed intervals as follows.
Let $I_0=[0,1]$. Given $I_k$ for some $k\in\Bbb N$, let $I_{k+1}$ be the closed left third of $I_k$ if $b_{k+1}=0$, and let $I_{k+1}$ be the right closed third of $I_k$ if $b_{k+1}=1$. The sequence $\langle I_k:k\in\Bbb N\rangle$ is a decreasing nest of closed intervals, so $\bigcap_{k\in\Bbb N}I_k\ne\varnothing$. On the other hand, the length of $I_k$ is $3^{-k}$, so the diameter of $\bigcap_{k\in\Bbb N}I_k$ is $0$, and it follows that there is a unique $y\in\bigcap_{k\in\Bbb N}I_k$.
All that remains is to verify that $x=f(y)$, which can be done by showing that $b_k=d_k(y)$ for each $k\in\Bbb Z^+$. But this is clear from the construction of the intervals $I_k$: for each $k\in\Bbb N$ we have $d_{k+1}(y)=0$ iff $y$ is to the left of the nearest open interval removed at step $k+1$ iff $I_{k+1}$ is the closed left third of $I_k$ iff $b_{k+1}=0$.