Ok, obviously we want to be careful about using the same variables. Since x is used to represent elements in the domain of g, let's use y to represent the elements in the domain f. Making this change, we have
f continuous at g(a)
ly-g(a)l<[tex]\delta[/tex]
lf(y)-f(g(a)l<[tex]\epsilon[/tex]
Now note that if we replace y with g(x), which is certainly allowed, we are very close to what we need. Namely, lg(x)-g(a)l<[tex]\delta[/tex] implies that |f(g(x))-f(g(a)l<[tex]\epsilon[/tex]. But we also know that we reserved the variable delta for lx-al<[tex]\delta[/tex]. So we need to change the delta in lg(x)-g(a)l<[tex]\delta[/tex] to some other variable.
In fact, we can choose any variable that is greater than 0 (Why?). So let's choose d' (delta prime). Now how can we use the fact that d' > 0 to connect our delta in |x-a| < [tex]\delta[/tex] to our epsilon in |f(g(x))-f(g(a)l<[tex]\epsilon[/tex]?