Lemma (composition preserves continuity)
Let $f: (X,\tau)\to (Y,\rho)$ and $g: (Y,\rho)\to (Z,\sigma)$ be functions between topological spaces.
If $f$ is continuous at $x_0\in X$ and $g$ is continuous at $f(x_0)\in Y$, then $g\circ f$ is continuous at $x_0$.