Prove that if $f:A\to B$ is uniformly continuous on $A$ and $g$ is uniformly continuous on $B$, then $g(f(x))$ is uniformly continuous on $A$ Suppose that $f\colon A \to B$ is uniformly continuous on $A$ and $g$ is uniformly continuous on $B$. Show that $g \circ f$ is uniformly continuous on $A$.
I tried to use the definition of uniformly continuous but it doesn't work.

Here is a slightly more formal answer.  Throughout, I implicitly assume $\;\varepsilon,\delta,\ldots > 0\;$, $\;x,y \in A\;$, and $\;w,z \in B\;$: this simplifies the formulae.
By the definition of uniform continuity, you are asked to prove
$$
(0) \;\;\; \langle \forall \varepsilon :: \langle \exists \delta :: \langle \forall x,y :: |x-y| < \delta \;\Rightarrow\; |(g \circ f)(x)-(g \circ f)(y)| < \varepsilon \rangle \rangle \rangle
$$
given that
\begin{align}
(1) \;\;\; & \langle \forall \varepsilon_1 :: \langle \exists \delta_1 :: \langle \forall x,y :: |x-y| < \delta_1 \;\Rightarrow\; |f(x)-f(y)| < \varepsilon_1 \rangle \rangle \rangle \\
(2) \;\;\; & \langle \forall \varepsilon_2 :: \langle \exists \delta_2 :: \langle \forall w,z :: |w-z| < \delta_2 \;\Rightarrow\; |g(w)-g(z)| < \varepsilon_2 \rangle \rangle \rangle \\
\end{align}
(I have chosen different names for the quantified variables to reduce confusion in what follows.)
So starting with most complex part of $(0)$, which is $\;|(g \circ f)(x)-(g \circ f)(y)| < \varepsilon\;$, and working backwards, we have for any $\;\varepsilon\;$
\begin{align}
& |(g \circ f)(x)-(g \circ f)(y)| < \varepsilon \\
\equiv & \;\;\;\;\;\text{"definition of $\;\circ\;$"} \\
& |g(f(x))-g(f(y))| < \varepsilon \\
\Leftarrow & \;\;\;\;\;\text{"by $(2)$ for $\;\varepsilon_2 := \varepsilon\;$, for some $\;\delta_2\;$"} \\
& |f(x)-f(y)| < \delta_2 \\
\Leftarrow & \;\;\;\;\;\text{"by $(1)$ for $\;\varepsilon_1 := \delta_2\;$, for some $\;\delta_1\;$"} \\
& |x-y| < \delta_1 \\
\end{align}
In other words, there is a $\;\delta\;$ (namely, $\;\delta_1\;$) such that $$\langle \forall x,y :: |x-y| < \delta \;\Rightarrow\; |(g \circ f)(x)-(g \circ f)(y)| < \varepsilon \rangle$$  In yet other words, this proves $(0)$.
