Constructing a certain rational number (Rudin)
This is what the OP says in a comment: Yes, I would like to see the construction of $\,q$ .
If that's all, then we are lucky; I've recently posted a derivation of the formula
as an answer to this question:
Contrary to a statement in an answer by Paramanand Singh, there is nothing mysterious / magical about the formula by
Rudin. Seems that another author has been re-inventing the wheel, though :-(
Summary of the know how. To understand why the above link should be followed.
Essential ingredient is the mediant
of two fractions. And how the Stern-Brocot tree
is formed with help of these mediants. We initialize $p < \sqrt{2}$ and $q > \sqrt{2}$ as:
$$
p = \frac{m}{n} \quad ; \quad q = \frac{2n}{m}
$$
Where $m$ and $n$ are positive integers. Now form the mediant of $p$ and $q$ , two times:
$$
q := \frac{m+2n}{n+m} \quad ; \quad q := \frac{m+(m+2n)}{n+(n+m)} = \frac{2m+2n}{m+2n} = \frac{2p+2}{p+2}
$$
The rightmost formula is already Rudin's.