One thing to understand is that $x\in(a,b)$ so that $\lim_{x\to a}$ is effectively the limit as $x$ approaches $a$ from above. Thus, the condition "if $a<x<c_2$" in the proof actually means for any $x$ sufficiently close to $a$, and the same is true for "if $a<x<c_3$."
Equation (21) thus shows that $f(x)/g(x)<q$ for any $q>A$ and $x$ sufficiently close to $a$. Equation (22) that $f(x)/g(x)>p$ for any $p<A$ and $x$ sufficiently close to $a$. These conditions give us that the limit of $f(x)/g(x)$ exists and equals $A$. The existence of the limit is usually defined with epsilons, i.e., defined to mean, given any $\epsilon>0$, that $|f(x)/g(x)-A|<\epsilon$ for $x$ sufficiently close to $a$, but we can see that this holds by taking $q=A+\epsilon$ and $p=A-\epsilon$ in (21) and (22).
MathJax
and $\LaTeX$. – hardmath Apr 10 '17 at 21:00