Cardinality, Bijections
To show that $\mathbb{R}^2$ has the same cardinality as $\mathbb{R}$ you have to show that a bijection $f$ between both sets exists.
$$
f : \mathbb{R}^2 \to \mathbb{R} \\
$$
To what particular element from $\mathbb{R}$ a pair from $\mathbb{R}^2$ is assigned does not matter, only that $f$ is bijective.
$$
\forall (x,y), (x', y') \in \mathbb{R}^2: f((x,y)) = f((x',y')) \Rightarrow (x,y) = (x', y') \\
\forall z \in \mathbb{R}: \exists (x, y) \in \mathbb{R}^2: f((x,y)) = z
$$
A bijection provides a 1 to 1 correspondence between sets, here: between pairs from $\mathbb{R}^2$ and elements from $\mathbb{R}$. Every pair should get assigned to exactly one element. Each element should have exactly one pair assigned to it by $f$.
From your post it is not easy to see what mapping $f$ was used. You should try to extract that information from your proof.
Your Question
In trying to understand the proof that $|\mathbb R\times \mathbb
R|=|\mathbb R|$, the only part I can't understand is the use of the
Cartesian Product. How can an element in the set $\mathbb R\times
\mathbb R$ such as (0.7777777777......, 0.033333333333......) create
the number (0.707373737373......) in $\mathbb R$?
I can see that this number comes from adding the corresponding decimal
digits from each of the numbers in
(0.7777777777..........,0.033333333333............), but since when is
combining decimal digits in this way an "allowable" operation?
What seems to be done here is to map from pairs of non-negative real numbers to a non-negative real number:
$$
\mathbb{R}_+^2 \to^g D^2 \to^f D \to^h \mathbb{R}_+ \quad (*)
$$
where
$$
D \subset \{ 0,1,2,3,4,5,6,7,8,9, . \}^\omega \subset \Sigma^\omega
$$
is the set string representations of non-negative decimal numbers, which is a subset of the set of infinite strings using digits and dot symbols, e.g. $0..0$ is maybe a drunken mouse, but no representation of a decimal, or $\cdots111.222\cdots$ is no representation of a finite number etc.
$g$ is a function that assigns a base 10 representation string to a real number.
$f$ zips two representation strings into one,
$$
f(
(d_m d_{m-1} \cdots d_0 . d_{-1} \cdots d_{-m} \cdots )_{10},
(D_m D_{m-1} \cdots D_0 . D_{-1} \cdots D_{-m} \cdots )_{10})
=
(d_m D_m d_{m-1} D_{m-1} \cdots d_0 D_0 . d_{-1} D_{-1} \cdots d_{-m} D_{-m} \cdots)_{10}
$$
Note: I omitted signs, because I do not know how it zips signed numbers in a bijective way, such that we could unzip and recover the signs correctly.
$h$ maps that string to a non-negative real number.
$$
h((d_m d_{m-1} \cdots d_0 . d_{-1} \cdots d_{-m} \cdots )_{10})
= \sum_{k=-\infty}^m d_k 10^k
$$
To have a bijection from left to right in equation $(*)$, each map in the chain must be bijective.
But we have $h((1.000\cdots)_{10}) = h((0.999\cdots)_{10}) = 1$, so $h$ is not injective.
So if this is really used in your proof, I would expect some normalization rules to restrict $D$ (and the involved mappings $g$ and $h$) to a normalized set, e.g. not including words with infinite 9 end words.
That might give a bijection between $\mathbb{R}_+^2$ and $\mathbb{R}_+$, but what about signed reals?
For this we need another bijection $s : \mathbb{R} \to \mathbb{R}_+$, e.g. $s = \exp$. This gives
$$
\mathbb{R}^2 \to^s \mathbb{R}_+^2 \to^g D^2 \to^f D \to^h \mathbb{R}_+ \to^{s^{-1}} \mathbb{R}
$$
double f(double x, double y). That is the programming counterpart to $f: \mathbb{R} \times \mathbb{R} \to \mathbb{R}$. All it means is that $f$ is a function that takes in two real values and outputs a single real value. It doesn't say a thing about how it combines those values. The actual function definition, which in this case asserts that the digits are interleaved, tells you how they're combined. – Brian Tung May 13 '15 at 01:58