Theorem 5.13 in "Principles of Mathematical Analysis" by Walter Rudin L'Hospital's Rule L'Hopital's Rule I am reading "Principles of Mathematical Analysis" by Walter Rudin.  
Thank you Saaqib Mahmood.
I copied and pasted your text 
Theorem 5.13 on p.109:  

Suppose $f$ and $g$ are real and differentiable in $(a, b)$, and $g^\prime(x) \neq 0$ for all $x \in (a, b)$, where $-\infty \leq a < b \leq +\infty$. Suppose 
  $$ \frac{f^\prime(x)}{g^\prime(x)} \to A \ \mbox{ as } \ x \to a. \tag{13} $$
  If 
  $$ f(x) \to 0 \ \mbox{ and } \ g(x) \to 0 \ \mbox{ as } \ x \to a, \tag{14} $$
  or if 
  $$ g(x) \to +\infty \ \mbox{ as } \ x \to a, \tag{15} $$
  then 
  $$ \frac{f(x)}{g(x)} \to A \ \mbox{ as } \ x \to a. \tag{16}$$
  The analogous statement is of course also true if $x \to b$, or if $g(x) \to -\infty$ in (15). Let us note that we now use the limit concept in the extended sense of Definition 4.33. 

Here is Definition 4.33: 

Let $f$ be a real function defined on $E \subset \mathbb{R}$. We say that 
  $$ f(t) \to A \ \mbox{ 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 \neq x$. 

And, here is Rudin's proof: 

We first consider the case in which $-\infty \leq A < +\infty$. Choose a real number $q$ such that $A < q$, and then choose $r$ such that $A < r < q$. By (13) there is a point $c \in (a, b)$ such that $a < x < c$ implies 
  $$ \frac{ f^\prime(x) }{ g^\prime(x) } < r. \tag{17} $$
  If $a < x < y < c$, then Theorem 5.9 shows that there is a point $t \in (x, y)$ such that 
  $$ \frac{ f(x)-f(y) }{ g(x)-g(y) } = \frac{f^\prime(t)}{g^\prime(t)} < r. \tag{18} $$
  Suppose (14) holds. Letting $x \to a$ in (18), we see that 
  $$ \frac{f(y)}{g(y)} \leq r < q \qquad \qquad \qquad  (a < y < c) \tag{19} $$
Next, suppose (15) holds. Keeping $y$ fixed in (18), we can choos a point $c_1 \in (a, y)$ such that $g(x) > g(y)$ and $g(x) > 0$ if $a < x < c_1$. Multiplying (18) by $\left[ g(x)- g(y) \right]/g(x)$, we obtain
  $$ \frac{ f(x) }{ g(x) } < r - r \frac{ g(y) }{g(x)} + \frac{f(y)}{g(x)} \qquad \qquad \qquad (a < x < c_1). \tag{20}$$
  If we let $x \to a$ in (20), (15) shows that there is a point $c_2 \in \left( a, c_1 \right)$ such that 
  $$ \frac{ f(x) }{ g(x) } < q \qquad \qquad \qquad (a < x < c_2 ). \tag{21} $$
Summing up, (19) and (21) show that for any $q$, subject only to the condition $A < q$, there is a point $c_2$ such that $f(x)/g(x) < q$ if $a < x < c_2$. 
In the same manner, if $-\infty < A \leq +\infty$, and $p$ is chosen so that $p < A$, we can find a point $c_3$ such that 
  $$ p < \frac{ f(x) }{ g(x) } \qquad \qquad \qquad ( a< x < c_3), \tag{22} $$ 
  and (16) follows from these two statements. 

Rudin assumed that $g'(x) \neq 0$ for all $x \in (a, b)$ but didn't assume that $g(x) \neq 0$ for all $x \in (a, b)$.  
If $g(y) = 0$ in (18) and (19), division by zero occurres.
By the way, if we write $$ \frac{f(x)}{g(x)} \to A \ \mbox{ as } \ x \to a,$$ do we assume implicitly that $g(x) \neq 0$ for all $x$ which is near $a$?
Then, we don't need to assume that $g'(x) \neq 0$ for all $x \in (a, b)$ and don't need to assume that $g(x) \neq 0$ for all $x \in (a, b)$.  
 A: If $g(x)=g(y)$ then by Theorem 5.10 (Lagrange), $0=g(x)-g(y)=(x-y)g'(t)$ for some $t\in (x,y)$. It follows that $g'(t)=0$, contradicts with the assumption $g'(x)\neq 0$ for all $x\in (a,b)$.
A: Suppose that $g$ are real and differentiable in $(a,b)$.
Suppose that $g′(x) \neq 0$ for all $x \in (a,b)$, where $-\infty \leq a < b \leq +\infty$.
Suppose that $\ g(x) \to 0 \ \mbox{ as } \ x \to a$.  
Then we can prove that $g(x) \neq 0$ for all $x \in (a, b)$.  
Proof

Assume that $g(x) = 0$ for some $x \in (a, b)$.
  Let $x_o \in (a, b)$ and $g(x_0) = 0$.  
Then, $g(x) \neq 0$ for all $x \in (a, x_0)$.
  Assume that $g(x) = 0$ for some $x \in (a, x_0)$.
  Let $x_1 \in (a, x_0)$ and $g(x_1) = 0$.
  Then, by Rolle's theorem, $g'(x) = 0$ for some $x \in (x_1, x_0)$.
  This is a contradiction.  
$g(x) > 0$ for all $x \in (a, x_0)$ or $g(x) < 0$ for all $x \in (a, x_0)$.
  Assume that $g(x) \leq 0$ for some $x \in (a, x_0)$ and $g(x) \geq 0$ for some $x \in (a, x_0)$.
  Let $x_2$ be a real number such that $x_2 \in (a, x_0)$ and $g(x_2) \leq 0$.
  Let $x_3$ be a real number such that $x_3 \in (a, x_0)$ and $g(x_3) \geq 0$.
  Then, $g(x_2) \neq 0$ and $g(x_3) \neq 0$.
  So, $g(x_2) < 0$ and $g(x_3) > 0$.
  Then, by the intermediate value theorem, $g(x) = 0$ for some $x$ between $x_2$ and $x_3$.
  This is a contradiction.  
(1) Suppose that $g(x) > 0$ for all $x \in (a, x_0)$.
  Let $x_4 \in (a, x_0)$.
  Then, $g(x_4) > 0$.
  Since $g(x_4) > \frac{g(x_4)}{2} > g(x_0) = 0$, by the intermediate value theorem,
$g(x_5) = \frac{g(x_4)}{2}$ for some $x_5 \in (x_4, x_0)$.  
Since $\lim_{x \to a} g(x) = 0$, $0 < g(x) < \frac{g(x_4)}{2}$ for all $x \in (a, x_6)$ for some $x_6 \in (a, x_4)$.
  Let $x_7 \in (a, x_6)$.
  Then, $g(x_7) < \frac{g(x_4)}{2} < g(x_4)$.
  Then, by the intermediate value theorem, $g(x_8) = \frac{g(x_4)}{2}$ for some $x_8 \in (x_7, x_4)$.  
Since $g(x_5) = g(x_8) = \frac{g(x_4)}{2}$ and $x_8 < x_5$, by Rolle's theorem, $g'(x_9) = 0$ for some $x_9 \in (x_8, x_5)$.
  This is a contradiction.  
(2) Suppose that $g(x) < 0$ for all $x \in (a, x_0)$.
  Let $x'_4 \in (a, x_0)$.
  Then, $g(x'_4) < 0$.
  Since $g(x'_4) < \frac{g(x'_4)}{2} < g(x_0) = 0$, by the intermediate value theorem,
$g(x'_5) = \frac{g(x'_4)}{2}$ for some $x'_5 \in (x'_4, x_0)$.  
Since $\lim_{x \to a} g(x) = 0$, $\frac{g(x'_4)}{2} < g(x) < 0$ for all $x \in (a, x'_6)$ for some $x'_6 \in (a, x'_4)$.
  Let $x'_7 \in (a, x'_6)$.
  Then, $g(x'_4) < \frac{g(x'_4)}{2} < g(x'_7)$.
  Then, by the intermediate value theorem, $g(x'_8) = \frac{g(x'_4)}{2}$ for some $x'_8 \in (x'_7, x'_4)$.  
Since $g(x'_5) = g(x'_8) = \frac{g(x'_4)}{2}$ and $x'_8 < x'_5$, by Rolle's theorem, $g'(x'_9) = 0$ for some $x'_9 \in (x'_8, x'_5)$.
  This is a contradiction.  

A: If we suppose $g^{\prime}(x)\ne 0$ for all $x\in (a,b)$. Then $g$ is increasing if $g^{\prime}(x)> 0$, and in this case $g(x)<g(y)$ whenever $x<y$; or $g$ is decreasing if $g^{\prime}(x)< 0$, and in this case $g(x)>g(y)$ whenever $x<y$.
Thus when $g(x)\to 0$ as $x \to a$, we must have $g(y)\ne0$ for every $y$ different from $x$.
