Let $A$ be s set and $B,C$ normed vector spaces over $\mathbb R$ and $S \subseteq X.$
Let $f:A\to S$ be a function and $g:S\to Y$ be a uniformly continuous function.
Show that $\forall \epsilon>0, \exists \delta>0$ s.t if there are functions $f_1:A\to S$ and $g_1:S\to Y$ s.t $\|f_1-f\|_\infty<\delta $ and $\|g_1-g\|_\infty<\epsilon$, then $\|g\circ f- g_1\circ f_1 \|_\infty<2\epsilon$
I know that since $g$ uniformly continuous for each $\epsilon$ i can find a $\delta$ s.t
for all $x,y\in S \ \ \|x-y\|<\delta \implies\|g(x)-g(y)\|<\epsilon$. But I dont find a way to take supnorm into action and a way to take $2\epsilon$.
By the triangular inequality we have $$\|g \circ f - g_1 \circ f_1\|_{\infty} \leq \|g \circ f - g \circ f_1\|_{\infty} + \|g \circ f_1 - g_1 \circ f_1\|_{\infty}.$$ The first term can be estimated as $$\|g \circ f - g \circ f_1\|_{\infty} = \sup\limits_{x \in A} |g(f(x)) - g(f_1(x))| < \epsilon,$$ since $\|f - f_1\|_{\infty} < \delta$ and $g$ is uniformly continuous. The second term can be estimated as $$\|g \circ f_1 - g_1 \circ f_1\|_{\infty} = \sup\limits_{x \in A} |g(f_1(x)) - g_1(f_1(x))| \leq \|g - g_1\|_{\infty} < \epsilon.$$