How do you prove the following?
Suppose $y=f(x)$ such that $\lim_{x\to a}f(x) = b$
If
1) $g$ is continuous at $b$
or
2) $f(x) \neq b$ for all $x$ and $\lim_{y\to b}g(y)$ exist then $$ \lim_{x\to a}g(f(x)) = \lim_{y\to b}g(y) $$
I got the first condition its pretty straightforward:
Since $|f(x)-b|< \varepsilon$ for any $\varepsilon$, $|x-a| < \delta$ can be satisfied and $g$ is continuous $\Rightarrow$ there exist $\varepsilon$ such that $|g(f(x)-g(b)|< \varepsilon$2 is satisfied. $\varepsilon$ can always be chosen, and thus $\delta$, which gives our result for the first condition.
Im having problems with the second condition though.