We have $C = 2^\mathbb{N}$ and we identify the Cantor set with the image of $C$ via:
$
t\colon C \rightarrow [0,1], \left(x_n\right)_n \mapsto \sum_{n=1}^{\infty}\frac{2x_n}{3^n}
$
Now if $x,y\in t(C)$ and $\lvert x - y \rvert < 3^{-N}$ for some $N\in \mathbb{N}$ then the first $N$ digits of $x$ and $y$ coincide.
Now intuitively this seems very clear, however I cant seem to formalize it. I tried by contradiction i.e. let $j<N$ s.t $x_j \neq y_j$, and then tried to bound the distance from below but I couldnt finish the bound. How can one prove this?
One can use induction to prove
As the base case take $N = 0$ for which $A(0)$ it is trivially true.
Now assume that $A(N)$ is true. We prove that $A(N+1)$ is true.
Consider $(x_n), (y_n) \in C$ such that $\lvert t((x_n)) - t((y_n)) \rvert < 3^{-(N+1)}$ which means that $$d := \sum_{n=1}^\infty \frac{2x_n}{3^n} - \sum_{n=1}^\infty \frac{2y_n}{3^n}$$ satiesfies $\lvert d \rvert < 3^{-(N+1)}$.
Using $A(N)$ we get $x_n = y_n$ for $n \le N$ and therefore $$d = \sum_{n=N+1}^\infty \frac{2(x_n-y_n)}{3^n} .$$
Assume that $x_{N+1} \ne y_{N+1}$, w.l.o.g. $x_{N+1} = 1, y_{N+1} = 0$. With $$R = \sum_{n=N+2}^\infty \frac{2(x_n-y_n)}{3^n}$$ we get $$d = \frac{2}{3^{N+1}} + R .$$
We have $$\lvert R \rvert \le \sum_{n=N+2}^\infty \frac{2\lvert x_n-y_n \rvert}{3^n}\le \sum_{n=N+2}^\infty \frac{2}{3^n} = \frac{2}{3^{-(N+2)}}\sum_{n=0}^\infty \frac{1}{3^n} = \frac{2}{3^{-(N+2)}} \frac 3 2 = \frac{1}{3^{-(N+1)}}. $$ Since $R \ge - \lvert R \rvert$, we get $$d \ge \frac{2}{3^{N+1}} - \lvert R \rvert \ge \frac{2}{3^{N+1}} -\frac{1}{3^{N+1}} = 3^{-(N+1)} $$
which is a contradiction.