[step:Conclude every admissible local quotient is continuous at $a$]
Let $r>0$ be any radius such that $g(x)\ne 0$ for every $x \in B(a,r)$, and define
\begin{align*}
q:B(a,r) &\to \mathbb{R}
\end{align*}
by $q(x)=f(x)/g(x)$ for every $x \in B(a,r)$. We prove that this arbitrary admissible quotient map is continuous at $a$.
Let $r_0>0$ be the radius constructed above, and let
\begin{align*}
r_1=\min\{r,r_0\}.
\end{align*}
Define
\begin{align*}
u_1:B(a,r_1) &\to \mathbb{R}
\end{align*}
by $u_1(x)=1/g(x)$ for every $x \in B(a,r_1)$. Since $r_1\le r_0$, the previous step applies to the restriction of the reciprocal and proves that $u_1$ is continuous at $a$ on $B(a,r_1)$ with the subspace metric.
The restriction $f|_{B(a,r_1)}:B(a,r_1)\to\mathbb{R}$ is continuous at $a$ because the $\varepsilon$-$\delta$ condition for $f$ on $X$ restricts to points of $B(a,r_1)$. By the product argument already proved, applied in the [metric space](/page/Metric%20Space) $B(a,r_1)$, the map
\begin{align*}
q|_{B(a,r_1)}=f|_{B(a,r_1)}\,u_1:B(a,r_1)\to\mathbb{R}
\end{align*}
is continuous at $a$.
It remains to translate this continuity from the smaller ball back to the domain $B(a,r)$. Let $\varepsilon>0$ be given. Since $q|_{B(a,r_1)}$ is continuous at $a$, there exists $\delta_1>0$ such that, for every $x \in B(a,r_1)$,
\begin{align*}
d_X(x,a)<\delta_1 \implies |q(x)-q(a)|<\varepsilon.
\end{align*}
Define $\delta=\min\{r_1,\delta_1\}$. If $x \in B(a,r)$ and $d_X(x,a)<\delta$, then $x\in B(a,r_1)$, so the preceding implication gives $|q(x)-q(a)|<\varepsilon$. Hence $q:B(a,r)\to\mathbb{R}$ is continuous at $a$ for the arbitrary admissible radius $r$.
The constructed radius $r_0$ gives a neighbourhood of $a$ on which $g$ is nonzero, and the preceding paragraph proves the quotient conclusion for every radius satisfying the nonvanishing hypothesis.
[/step]