General proof of limit composition theorem on continuous function

Let $\varepsilon>0$.

By the second limit, $|g(y)-c|<\varepsilon$ for all $|y-b|<\delta$ for a certain $\delta>0$. By the first limit, $|f(x)-b|<\delta$ for all $|x-a|<\delta'$ for a certain $\delta'>0$. And thus, if $|x-a|<\delta'$, $$|f(x)-b|<\delta,$$ therefore $$|g(f(x))-c|<\varepsilon$$ if $|x-a|<\delta'$.