Given f:A→R and g:B→R suppose that the range f(A)={f(x):x∈A} is contained in the domain B so that the composition g∘f(x)=g(f(x)) is defined on A.
If f is continuous at c∈A and if g is continuous at f(c)∈B then g∘f is continuous at c.
Proof
See 43 Continuity Practice#4.3.3.
☐