Composite of Continuous Mappings between Metric Spaces is Continuous

Theorem
Let $M_1 = \struct {X_1, d_1}$, $M_2 = \struct {X_2, d_2}$ and $M_3 = \struct {X_3, d_3}$ be metric spaces.

Let $f: M_1 \to M_2$ and $g: M_2 \to M_3$ be continuous mappings.

Then their composite $g \circ f: M_1 \to M_3$ is continuous.