I actually quite like this proof after puzzling through it for a while. I'll only address the first half of the proof, and I can answer each of your questions about
- Why we are choosing $r$ and $q$ and
- In going from (18) to (19), how we go from strict to non-strict inequality.
First to lay some groundwork. (I'm going to quote Rudin's Definition 4.33 first.) Let $f$ be a real function defined on $E\subset\mathbf R$. We say that
$$
f(t)\to A\:\text{as}\:t\to x,
$$
where $A$ and $x$ are in the extended real number system, if for every neighborhood $U$ of $A$ there is a neighborhood $V$ of $x$ such that $V\cap E$ is not empty, and such that $f(t)\in U$, for all $t\in V\cap E$, $t\ne x$.
In the first case, we are considering the case where $A$ could be $-\infty$ or some real number. The idea is we are trying to show that for every neighborhood $U$ of $A$ there is some neighborhood $(a,c)$ of $a$ such that we can squeeze the quotient $f(y)/g(y)$ past the right endpoint of $U$ into $U$. Think of the neighborhood $U$ as having right endpoint $q$.
Thus, we choose $A
To address 2., suppose we have a framework as in Rudin's Definition 4.33 and furthermore that $f(x)M$, then the idea is we should be able to find some neighborhood around $\lim f(x)$ such that in that neighborhood all the values $f(x)$ are greater than $M$, a clear contradiction of our hypothesis that $f(x)< M$ on $E$. From Rudin's (18), define
$$
h(x) = \frac{f(x)-f(y)}{g(x)-g(y)}.
$$
If you agree that $h(x)neighborhoods of $A$, but our non-strict inequality is preventing that. This is where $q$ comes in. If we note that for arbitrary $q>r$, we could get $f(y)/g(y)