[proofplan]
We prove each algebra rule directly from the $\varepsilon$-$\delta$ definition of continuity relative to $E$. The sum and difference estimates follow by splitting the error with the triangle inequality and using continuity of $f$ and $g$ with tolerance $\varepsilon/2$. For the product and quotient, we first extract local bounds from continuity at $a$; for the quotient we also use continuity of $g$ and the assumption $g(a)\ne 0$ to make the denominator uniformly separated from $0$ near $a$.
[/proofplan]
[step:Split the sum and difference errors by the triangle inequality]
Let $\varepsilon>0$. Since $f$ is continuous at $a$, there exists $\delta_f>0$ such that for every $x \in E$ with $|x-a|<\delta_f$,
\begin{align*}
|f(x)-f(a)|<\frac{\varepsilon}{2}.
\end{align*}
Since $g$ is continuous at $a$, there exists $\delta_g>0$ such that for every $x \in E$ with $|x-a|<\delta_g$,
\begin{align*}
|g(x)-g(a)|<\frac{\varepsilon}{2}.
\end{align*}
Define $\delta:=\min\{\delta_f,\delta_g\}>0$. If $x \in E$ and $|x-a|<\delta$, then the triangle inequality gives
\begin{align*}
|(f+g)(x)-(f+g)(a)| \le |f(x)-f(a)|+|g(x)-g(a)|<\varepsilon.
\end{align*}
Thus $f+g$ is continuous at $a$.
For the difference, if $x \in E$ and $|x-a|<\delta$, then
\begin{align*}
|(f-g)(x)-(f-g)(a)| \le |f(x)-f(a)|+|g(x)-g(a)|<\varepsilon.
\end{align*}
Thus $f-g$ is continuous at $a$.
[/step]
[step:Use local boundedness to control the product error]
Define the constant
\begin{align*}
M_f:=|f(a)|+1.
\end{align*}
Then $M_f>0$. Since $f$ is continuous at $a$, there exists $\rho_f>0$ such that for every $x \in E$ with $|x-a|<\rho_f$,
\begin{align*}
|f(x)-f(a)|<1.
\end{align*}
For such $x$, the triangle inequality gives
\begin{align*}
|f(x)| \le |f(a)|+|f(x)-f(a)|<M_f.
\end{align*}
Let $\varepsilon>0$. Since $g$ is continuous at $a$, there exists $\eta_g>0$ such that for every $x \in E$ with $|x-a|<\eta_g$,
\begin{align*}
|g(x)-g(a)|<\frac{\varepsilon}{2M_f}.
\end{align*}
Since $f$ is continuous at $a$, there exists $\eta_f>0$ such that for every $x \in E$ with $|x-a|<\eta_f$,
\begin{align*}
|f(x)-f(a)|<\frac{\varepsilon}{2(|g(a)|+1)}.
\end{align*}
Define $\eta:=\min\{\rho_f,\eta_f,\eta_g\}>0$. If $x \in E$ and $|x-a|<\eta$, then
\begin{align*}
|f(x)g(x)-f(a)g(a)| \le |f(x)|\,|g(x)-g(a)|+|g(a)|\,|f(x)-f(a)|.
\end{align*}
Using the three defining properties of $\eta$, we obtain
\begin{align*}
|f(x)g(x)-f(a)g(a)| < M_f\frac{\varepsilon}{2M_f}+|g(a)|\frac{\varepsilon}{2(|g(a)|+1)} \le \varepsilon.
\end{align*}
Therefore $fg$ is continuous at $a$.
[guided]
The product cannot be handled by only asking both $f(x)-f(a)$ and $g(x)-g(a)$ to be small; after expanding, one factor remains un-differenced. We first make that factor bounded near $a$.
Define
\begin{align*}
M_f:=|f(a)|+1.
\end{align*}
This constant is positive. Since $f$ is continuous at $a$, applying the definition with tolerance $1$ gives a number $\rho_f>0$ such that for every $x \in E$ with $|x-a|<\rho_f$,
\begin{align*}
|f(x)-f(a)|<1.
\end{align*}
The triangle inequality then gives
\begin{align*}
|f(x)| \le |f(a)|+|f(x)-f(a)|<|f(a)|+1=M_f.
\end{align*}
Thus $f$ is bounded by the explicit constant $M_f$ on a relative neighbourhood of $a$ in $E$.
Now fix $\varepsilon>0$. Continuity of $g$ at $a$ gives $\eta_g>0$ such that $x \in E$ and $|x-a|<\eta_g$ imply
\begin{align*}
|g(x)-g(a)|<\frac{\varepsilon}{2M_f}.
\end{align*}
Continuity of $f$ at $a$ gives $\eta_f>0$ such that $x \in E$ and $|x-a|<\eta_f$ imply
\begin{align*}
|f(x)-f(a)|<\frac{\varepsilon}{2(|g(a)|+1)}.
\end{align*}
We include $|g(a)|+1$ in the denominator so that it is strictly positive even when $g(a)=0$.
Define
\begin{align*}
\eta:=\min\{\rho_f,\eta_f,\eta_g\}.
\end{align*}
Then $\eta>0$. If $x \in E$ and $|x-a|<\eta$, we rewrite the product error by adding and subtracting $f(x)g(a)$:
\begin{align*}
f(x)g(x)-f(a)g(a)=f(x)(g(x)-g(a))+g(a)(f(x)-f(a)).
\end{align*}
Taking absolute values and applying the triangle inequality gives
\begin{align*}
|f(x)g(x)-f(a)g(a)| \le |f(x)|\,|g(x)-g(a)|+|g(a)|\,|f(x)-f(a)|.
\end{align*}
The definition of $\eta$ gives all three estimates needed in this inequality:
\begin{align*}
|f(x)g(x)-f(a)g(a)| < M_f\frac{\varepsilon}{2M_f}+|g(a)|\frac{\varepsilon}{2(|g(a)|+1)} \le \frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon.
\end{align*}
This is precisely the $\varepsilon$-$\delta$ condition for continuity of $fg$ at $a$.
[/guided]
[/step]
[step:Separate the denominator from zero near $a$]
Assume now that $g(a)\ne 0$. Define
\begin{align*}
\alpha:=\frac{|g(a)|}{2}.
\end{align*}
Then $\alpha>0$. Since $g$ is continuous at $a$, there exists $r>0$ such that for every $x \in E$ with $|x-a|<r$,
\begin{align*}
|g(x)-g(a)|<\alpha.
\end{align*}
Define the relative neighbourhood
\begin{align*}
U:=E \cap (a-r,a+r).
\end{align*}
For every $x \in U$, the [reverse triangle inequality](/theorems/2300) gives
\begin{align*}
|g(x)| \ge |g(a)|-|g(x)-g(a)|>|g(a)|-\frac{|g(a)|}{2}=\frac{|g(a)|}{2}>0.
\end{align*}
Thus $g(x)\ne 0$ for every $x \in U$, and the quotient function
\begin{align*}
h:U &\to \mathbb{R}
\end{align*}
defined by $h(x):=f(x)/g(x)$ is well-defined.
[/step]
[step:Estimate the quotient error on any nonvanishing relative neighbourhood]
Let $r>0$ be any number such that $g(x)\ne 0$ for every $x \in E\cap(a-r,a+r)$. Define the relative neighbourhood
\begin{align*}
U:=E\cap(a-r,a+r).
\end{align*}
Define the quotient function
\begin{align*}
h:U &\to \mathbb{R}
\end{align*}
by $h(x):=f(x)/g(x)$. This is well-defined because $g$ is nonzero on $U$. We prove that $h$ is continuous at $a$ as a function on $U$.
Let $\varepsilon>0$. Since $g(a)\ne 0$, define
\begin{align*}
\beta:=\frac{|g(a)|}{2}>0.
\end{align*}
By continuity of $g$ at $a$, there exists $\tau_g>0$ such that if $x\in E$ and $|x-a|<\tau_g$, then
\begin{align*}
|g(x)-g(a)|<\beta.
\end{align*}
For such $x$, the reverse triangle inequality gives $|g(x)|>|g(a)|/2$.
By continuity of $f$ at $a$, there exists $\sigma_f>0$ such that if $x\in E$ and $|x-a|<\sigma_f$, then
\begin{align*}
|f(x)-f(a)|<\frac{\varepsilon |g(a)|}{4}.
\end{align*}
By continuity of $g$ at $a$, there exists $\sigma_g>0$ such that if $x\in E$ and $|x-a|<\sigma_g$, then
\begin{align*}
|g(x)-g(a)|<\frac{\varepsilon |g(a)|^2}{4(|f(a)|+1)}.
\end{align*}
Define
\begin{align*}
\sigma:=\min\{r,\tau_g,\sigma_f,\sigma_g\}>0.
\end{align*}
If $x\in U$ and $|x-a|<\sigma$, then $x\in E$, $|x-a|<\tau_g$, and hence $|g(x)|>|g(a)|/2$. Also $|x-a|<\sigma_f$ and $|x-a|<\sigma_g$. Therefore
\begin{align*}
\left|\frac{f(x)}{g(x)}-\frac{f(a)}{g(a)}\right| \le \frac{|g(a)|\,|f(x)-f(a)|+|f(a)|\,|g(x)-g(a)|}{|g(x)|\,|g(a)|}.
\end{align*}
Using $|g(x)|>|g(a)|/2$ and the defining estimates for $\sigma_f$ and $\sigma_g$, we obtain
\begin{align*}
\left|\frac{f(x)}{g(x)}-\frac{f(a)}{g(a)}\right| < \frac{2}{|g(a)|^2}\left(|g(a)|\frac{\varepsilon |g(a)|}{4}+|f(a)|\frac{\varepsilon |g(a)|^2}{4(|f(a)|+1)}\right) \le \varepsilon.
\end{align*}
Thus $h=f/g$ is continuous at $a$ on the arbitrary relative neighbourhood $U=E\cap(a-r,a+r)$ on which $g$ is nonzero. Since the previous step proves that at least one such $r$ exists, and the earlier steps proved continuity of $f+g$, $f-g$, and $fg$ at $a$, all asserted algebra rules follow.
[guided]
The statement asks for more than continuity on the particular neighbourhood constructed above: it says that if $r>0$ is any radius for which $g$ has no zeros on $E\cap(a-r,a+r)$, then the quotient is continuous at $a$ on that domain. So we begin with an arbitrary such $r$ and define
\begin{align*}
U:=E\cap(a-r,a+r).
\end{align*}
The quotient map
\begin{align*}
h:U &\to \mathbb{R}
\end{align*}
given by $h(x):=f(x)/g(x)$ is well-defined because the present choice of $r$ assumes $g(x)\ne 0$ for every $x\in U$.
To prove continuity at $a$, we are allowed to shrink the $\delta$ used in the $\varepsilon$-$\delta$ condition. The whole interval $U$ need not satisfy a uniform lower bound such as $|g(x)|\ge |g(a)|/2$, but continuity only requires control for $x$ sufficiently close to $a$. Since $g(a)\ne 0$, set
\begin{align*}
\beta:=\frac{|g(a)|}{2}>0.
\end{align*}
Continuity of $g$ at $a$ gives $\tau_g>0$ such that $x\in E$ and $|x-a|<\tau_g$ imply
\begin{align*}
|g(x)-g(a)|<\beta.
\end{align*}
For such $x$, the reverse triangle inequality gives
\begin{align*}
|g(x)|\ge |g(a)|-|g(x)-g(a)|>|g(a)|-\frac{|g(a)|}{2}=\frac{|g(a)|}{2}.
\end{align*}
This is the local denominator bound needed in the quotient estimate.
Now fix $\varepsilon>0$. Continuity of $f$ at $a$ gives $\sigma_f>0$ such that $x\in E$ and $|x-a|<\sigma_f$ imply
\begin{align*}
|f(x)-f(a)|<\frac{\varepsilon |g(a)|}{4}.
\end{align*}
Continuity of $g$ at $a$ gives $\sigma_g>0$ such that $x\in E$ and $|x-a|<\sigma_g$ imply
\begin{align*}
|g(x)-g(a)|<\frac{\varepsilon |g(a)|^2}{4(|f(a)|+1)}.
\end{align*}
The denominator $|f(a)|+1$ is positive, and it also ensures
\begin{align*}
\frac{|f(a)|}{|f(a)|+1}\le 1.
\end{align*}
Define
\begin{align*}
\sigma:=\min\{r,\tau_g,\sigma_f,\sigma_g\}>0.
\end{align*}
If $x\in U$ and $|x-a|<\sigma$, then $x\in E$, the denominator estimate gives $|g(x)|>|g(a)|/2$, and the two smallness estimates for $f(x)-f(a)$ and $g(x)-g(a)$ both apply.
We estimate the quotient difference by putting the two fractions over a common denominator:
\begin{align*}
\left|\frac{f(x)}{g(x)}-\frac{f(a)}{g(a)}\right|=\left|\frac{g(a)f(x)-f(a)g(x)}{g(x)g(a)}\right|.
\end{align*}
Adding and subtracting $f(a)g(a)$ in the numerator gives
\begin{align*}
g(a)f(x)-f(a)g(x)=g(a)(f(x)-f(a))-f(a)(g(x)-g(a)).
\end{align*}
Taking absolute values and applying the triangle inequality yields
\begin{align*}
\left|\frac{f(x)}{g(x)}-\frac{f(a)}{g(a)}\right| \le \frac{|g(a)|\,|f(x)-f(a)|+|f(a)|\,|g(x)-g(a)|}{|g(x)|\,|g(a)|}.
\end{align*}
Using $|g(x)|>|g(a)|/2$ and the chosen bounds gives
\begin{align*}
\left|\frac{f(x)}{g(x)}-\frac{f(a)}{g(a)}\right| < \frac{2}{|g(a)|^2}\left(|g(a)|\frac{\varepsilon |g(a)|}{4}+|f(a)|\frac{\varepsilon |g(a)|^2}{4(|f(a)|+1)}\right) \le \frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon.
\end{align*}
This is exactly the $\varepsilon$-$\delta$ condition for continuity of $h=f/g$ at $a$ as a function on the arbitrary relative neighbourhood $U$. The previous step supplies the existence of at least one nonvanishing relative neighbourhood, and the sum, difference, and product rules were already proved.
[/guided]
[/step]