I will transcript the proof, with my questions and comments in bold. It is from the book Analysis I of Amann and Escher, page 343.
Let $f,g:(a,b)\to\Bbb R$ differentiable with $g(x)\neq 0$ for all $x\in(a,b)$. Suppose also either
a) $\lim_{x\to a} f(x)=\lim_{x\to a} g(x)=0$, or
b) $\lim_{x\to a} g(x)=\pm\infty$, then
$$\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f'(x)}{g'(x)}$$
if the limit of the RHS exists in $\bar{\Bbb R}$.
Proof: suppose that $\alpha:=\lim_{x\to a}f'(x)/g'(x)<\infty$. Then choose $\alpha_1,\alpha_0$ such that $\alpha<\alpha_1<\alpha_0$. Then exists some $x_1\in(a,b)$ where $f'(x)/g'(x)<\alpha_1$ for all $x\in(a,x_1)$.
Then for the Cauchy mean value theorem for all $x,y\in(a,x_1)$ with $x<y$ exists some $\xi\in(x,y)$ such that
$$\frac{f(y)-f(x)}{g(y)-g(x)}=\frac{f'(\xi)}{g'(\xi)}$$
Since $\xi<y<x_1$ it follows that
$$\frac{f(y)-f(x)}{g(y)-g(x)}<\alpha_1<\alpha_0,\quad x,y\in(a,x_1)\tag{1}$$
I) If a) holds then taking limits for $x\to a$ in $(1)$ we get
$$\frac{f(y)}{g(y)}\le\alpha_1<\alpha_0,\quad y\in(a,x_1)\tag{2}$$
II) Instead, if $\lim_{x\to a}g(x)=\infty$, for each $y\in(a,x_1)$ there is some $x_2\in(a,y)$ such that $g(x)>\max\{1,g(y)\}$. Then we can rearrange $(1)$ in this way
$$\frac{f(x)}{g(x)}<\alpha_1-\alpha_1\frac{g(y)}{g(x)}+\frac{f(y)}{g(x)},\quad x,y\in(a,x_2)\tag{3}$$
As $x\to a$ the RHS of $(3)$ converges to $\alpha_1$. Then there is some $x_3\in(a,x_2)$ such that $f(x)/g(x)<\alpha_0$ for $x\in(a,x_3)$. Since $\alpha_0$ was taken arbitrarily close to $\alpha$, and the result in $(2)$, in either case it follows that
$$\limsup_{x\to a}\frac{f(x)}{g(x)}\le\alpha$$
If $\alpha\in(-\infty,\infty]$ then by a similar argument
$$\liminf_{x\to a}\frac{f(x)}{g(x)}\ge\alpha$$
I dont understand this last statement, what is this "similar argument"? How is possible that in the last statement we get a $\ge$ instead of an $\le$? Some clarification will be welcome, thank you
Ok, I solved it. Just for the record, let define the functional limit superior and inferior:
$$\limsup_{x\to a}h(x)=\lim_{\epsilon\to 0}\sup h(\Bbb B(a,\epsilon)\setminus\{a\})=\inf_\epsilon\sup h(\Bbb B(a,\epsilon)\setminus\{a\})$$
$$\liminf_{x\to a}h(x)=\lim_{\epsilon\to 0}\inf h(\Bbb B(a,\epsilon)\setminus\{a\})=\sup_\epsilon\inf h(\Bbb B(a,\epsilon)\setminus\{a\})$$
Now, to simplify things observe that in the proof of the question the quantities $x_1$ or $x_2$ depends on $\alpha_0$. Because $\alpha_0>\alpha$ we can write $\alpha_0=\alpha+\epsilon$, and name $x_1=x_\epsilon$ for case a), and for the case b) we name $x_3=x_\epsilon$.
Then we can write, based in the above proof, for both cases
$$\frac{f(x)}{g(x)}<\alpha+\epsilon,\quad x\in(a,x_\epsilon)$$
In particular we have that
$$\sup_x \frac{f(x)}{g(x)}\le\alpha+\epsilon,\quad x\in(a,x_\epsilon)$$
Now taking limits for $\epsilon\to 0$ in the above expression we have that
$$\lim_{\epsilon\to 0}\sup_x \frac{f(x)}{g(x)}=\limsup_{x\to a}\frac{f(x)}{g(x)}\le\alpha$$
as it is stated in the proof. Now repeating the same analysis for some $\alpha_0<\alpha$ we can get the inequality
$$\liminf_{x\to a}\frac{f(x)}{g(x)}\ge\alpha$$
what solve the misterious proof :-).$\Box$