Given $g:I\to \mathbb{R}$ continuous and strictly increasing, and $f:J\to \mathbb{R}$. Prove that $\lim_{x\to g(a)}f(x) = \lim_{x\to a}f(g(x)) $ I have the following statement which I need to prove: 
Given $g:I\to \mathbb{R}$ continuous and strictly increasing, and $f:J\to \mathbb{R}$. 
Prove that $\lim_{x\to g(a)}f(x) = \lim_{x\to a}f(g(x)) $
It seems quite obvious, but I don’t understand how can I write the formal proof. According to what the professor told us we have to use the epsilon-delta limit definition and then use the fact that g is continuous.
 A: First, assume $\lim_{x \to g(a)} f(x) = c$. We want to prove $\lim_{y \to a} f(g(y)) = c$. Take some $\varepsilon > 0$. As $\lim_{x \to g(a)} f(x) = c$, for some $\eta > 0$ for any $x \in U_\eta(g(a))$, $f(x) \in U_\varepsilon(c)$. As $g$ is continuous in $a$, for some $\delta > 0$ for any $y \in U_\delta(a)$, $g(y) \in U\delta(g(a))$. Combined, for any $\varepsilon > 0$ there is $\delta > 0$ s.t. for any $y \in U_\delta(a)$ we have $g(y) \in U_\eta(g(a))$ and thus $f(g(y)) \in U_\varepsilon(c)$.
For the other side, assume $\lim_{y \to a} f(g(y)) = c$ and take some $\varepsilon > 0$. For some $\eta > 0$, if $y \in U_\eta(a)$, $f(g(y)) \in U_\varepsilon(c)$. Now, as $g$ is continuous and monotonic, there is some $\delta > 0$ s.t. for any $x \in U_\delta(g(a))$ there is some $y \in U_\eta(a)$ s.t. $y = g(x)$. Combining, for any $\varepsilon > 0$ thre is $\delta > 0$ s.t. for any $x \in U_\delta(g(a))$ there is some $y \in U_\eta(a)$ s.t. $g(y) = x$ and thus $f(x) = f(g(y)) \in U_\varepsilon(c)$.
To prove that for any $\eta > 0$ there is some $\delta > 0$ s.t. for any $x \in U_\delta(g(a))$ there is some $y \in U_\eta(a)$ s.t. $g(y) = x$, note that $g(a - \eta) < g(a) < g(a + \eta)$, then take $\delta = \min(g(a) - g(a - \eta), g(a + \eta) - g(a))$. Take some $x \in U_\delta(g(a))$. Note that $g(a - \eta) < x < g(a + \eta)$.
Let $y_0 = \inf \{y | g(y) \geqslant x\}$. We have $\lim_{y \to y_0+} g(y) \geqslant x$ and $\lim_{y \to y_0-} g(y) \leqslant x$. As $g$ is continuous, this means $g(y_0) = x$. As $g(a - \eta) < x < g(a + \eta)$, $y_0 \in U_\eta(a)$.
[just in case - $x \in U_y(z)$ is in case we work with $\mathbb R$ just another way to write $|x - z| \leqslant y$]
