Here is Prob. 12, Chap. 4, in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:
A uniformly continuous function of a uniformly continuous function is uniformly continuous.
State this more precisely and prove it.
Here is my effort:
Theorem:** Let $\left(X, d_X\right)$, $\left(Y, d_Y \right)$, and $\left( Z, d_Z \right)$ be metric spaces, let $f$ be a uniformly continuous mapping of $X$ into $Y$, let $g$ be a uniformly continuous mapping of $f(X)$ into $Z$, and let $h = g \circ f$. Then $h$ is a uniformly continuous mapping of $X$ into $Z$.
Proof:** Let $\varepsilon$ be a given real number such that $\varepsilon > 0$. Since $g$ is a unifromly continuous mapping of $f(X)$ into $Z$, we can find a real number $\eta > 0$ such that$$\tag{1} d_Z \left( g \left( y_1 \right), g \left( y_2 \right) \right) < \varepsilon$$ for any points $y_1$ and $y_2$ in $f(X)$ for which $$\tag{2} d_Y \left( y_1, y_2 \right) < \eta.$$Now as $f$ is a uniformly continuous mapping of $X$ into $Y$, so, corresponding to the real number $\eta > 0$ in particular, we can find a real number $\delta > 0$ such that $$ \tag{3} d_Y \left( f \left(x_1 \right), f \left( x_2 \right) \right) < \eta$$ for any points $x_1$ and $x_2$ in $X$ for which $$ \tag{4} d_X \left( x_1, x_2 \right) < \delta.$$So, we can conclude from (1), (2), (3), (4) above that, for any points $x_1$ and $x_2$ in $X$ which satisfy $$d_X \left( x_1, x_2 \right) < \delta,$$ the following is true.$$ d_Z \left( h \left(x_1 \right), h\left( x_2 \right) \right) = d_Z \left( g\left( f\left( x_1 \right) \right), g\left( f\left( x_2 \right) \right) \right) < \varepsilon, $$ from which it follows that $h = g \circ f$ is a uniformly continuous mapping of $X$ into $Z$.
Have I managed to get the statement of the theorem right? If so, then is my proof correct?