A proof about continuity of composition of functions. Suppose $f$ and $g$ are real valued functions such that $f \circ g$ defined at $c$. If $g$ is continuous at $c$ and $f$ is continuous at $g(c)$ then prove that $f \circ g$ is continuous at $c$.
I was beginning on my chapter on continuity and came across this statement, it was written that it's proof is beyond the scope of the book. I am very curious to learn how to prove it.

Let a tolerance  $\epsilon>0$ be given. The continuity of $f$ at $g(c)$ means that there is an allowance $\delta>0$ such that
$$|y-g(c)|<\delta\quad\Rightarrow\quad \bigl|f(y)-f\bigl(g(c)\bigr)\bigr|<\epsilon\ .\tag{1}$$
When we have chosen such a  $\delta>0$ the continuity of $g$ at $c$ means that  there is an allowance $\delta'>0$ such that
$$|x-c|<\delta'\quad\Rightarrow\quad |g(x)-g(c)|<\delta\ .$$
Letting $y:=g(x)$ in $(1)$ we therefore have
$$|x-c|<\delta'\quad\Rightarrow\quad\bigl|f\bigl(g(x)\bigr)-f\bigl(g(c)\bigr)\bigr|<\epsilon\ .$$
This proves that $f\circ g$ is continuous at $c$.
