Let $X,Y,Z$ be subsets of $\textbf{R}$. Let $f:X\rightarrow Y$ be a function which is uniformly continuous on $X$, and let $g:Y\rightarrow Z$ be a function which is uniformly continuous on $Y$. Show that the function $g\circ f:X\rightarrow Z$ is uniformly continuous on $X$.
MY ATTEMPT
Since both $g$ is uniformly continuous, for every $\varepsilon > 0$, there is a $\delta_{1} > 0$ such that for every $w,z\in Y$ we have that \begin{align*} |w - z| \leq \delta_{1} \Longrightarrow |g(w) - g(z)| \leq \varepsilon \end{align*} On the other hand, $f$ is uniformly continuous too. Then for every $\delta_{1} > 0$, there is a $\delta > 0$ such that for every $x,y\in X$ we have that \begin{align*} |x - y| \leq \delta \Longrightarrow |f(x) - f(y)| \leq \delta_{1} \end{align*}
Hence, if we make the substitution $w = f(x)$ and $z = f(y)$, we conclude that for every $\varepsilon > 0$, there is a $\delta > 0$ such that \begin{align*} |x - y| \leq \delta \Longrightarrow |g(f(x)) - g(f(y))| \leq \varepsilon \end{align*} thence we conclude that $g\circ f$ is uniformly continuous as well.
Could someone provide any comments on the proposed solutions?