Composite of Continuous Mappings at Point between Metric Spaces is Continuous at Point

Theorem
Let $M_1 = \left({X_1, d_1}\right), M_2 = \left({X_2, d_2}\right), M_3 = \left({X_3, d_3}\right)$ be metric spaces.

Let $f: M_1 \to M_2$ be continuous at $a \in X_1$.

Let $g: M_2 \to M_3$ be continuous at $f \left({a}\right) \in X_2$.

Then their composite $g \circ f: M_1 \to M_3$ is continuous at $a \in X_1$.

Proof
Let $\epsilon \in \R_{>0}$.

The strategy is to find a $\delta \in \R_{>0}$ such that:
 * $d_1 \left({x, a}\right) < \delta \implies d_3 \left({g \left({f \left({x}\right)}\right), g \left({f \left({a}\right)}\right)}\right) < \epsilon$

As $g$ is continuous at $f \left({a}\right)$:
 * $\exists \eta \in \R_{>0}: \forall y \in X_2: d_2 \left({y, f \left({a}\right)}\right) < \eta \implies d_3 \left({g \left({y}\right), g \left({f \left({a}\right)}\right)}\right) < \epsilon$

As $f$ is continuous at $a$:
 * $\forall \eta \in \R_{>0}: \exists \delta \in \R_{>0}: \forall x \in X_1: d_1 \left({x, a}\right) < \delta \implies d_2 \left({f \left({x}\right), f \left({a}\right)}\right) < \eta$

Hence:
 * $d_3 \left({g \left({f \left({x}\right)}\right), g \left({f \left({a}\right)}\right)}\right) < \epsilon$