Let (S1, d1), (S2,d2) and (S3,d3) be metric spaces. Suppose two functions f: S1 -> S2 and g: S2 -> S3 are continuous. Show that g(f(x)) is continuous by using the definition.

So I think the following is true:
for each eps1>0 there exists delt1>0 such that d1(s,s0)<delt1 => d2(f(s),f(s0))<eps1

for each eps2>0 there exists delt2>0 such that d2(s,s0)<delt2 => d3(g(s),g(s0))<eps2

Then I'm guessing you combine the two somehow.