Let f,g: R->R be functions. Suppose f(x)->k as x-> infinity and that g is continuous at k. Prove g(f(x))->g(k) as x -> inifnity

My attempt:

Assume not

Then |g(f(x)) - g(k)| > epsilon > 0 for all x > 0

so |g(k) - g(k)| > epsilon > 0 by continuity

which is a contradiction

Is this correct? Or am I missing something?

many thanks