Prove the differentiability of an inverse function, by the theorem of Caratheodory. The exact statement I am looking forward to prove is that:

Theorem
  Let $f \colon (a,b) \to (c,d)$ admit an inverse $g \colon (c,d) \to (a,b)$.
  If $f$ is differentiable on $(a,b)$ and $f'(m) \neq 0$ for $m \in (a,b)$ then $g$ is differentiable at $f(m)$ and $g'(f(m)) = 1/f'(m)$.
(Original image here.)


My try: By the theorem of Caratheodory, there exists a function $\phi:(a,b)\to\mathbb{R}$, $$f(x)-f(m)=\phi(x)(x-m)$$ continuous at $x=m$.
So since range of $g(x)$ is the domain of $f(x)$, $x\to g(x)$ gives$$f(g(x))-f(m)=\phi(g(x))(g(x)-m)$$$$x-f(m)=\phi(g(x))(g(x)-m)$$
For $x\neq f(m)$, $$\frac{x-f(m)}{g(x)-m}=\phi(g(x))$$ 
Now, in RHS, $\phi(x)$ is continuous at $x=m$. And the limit of the expression in the LHS gives the reciprocal of derivative of $g(x)$, but to take limits on both sides, I should first know that $g(x)$ is continuous. So how do I prove that?
Please don't post new methods to prove the theorem, I am looking forward to prove by the above method only.
 A: The result depends on a deeper result known as Darboux’s theorem (an intermediate value theorem for derivatives) which states that for all
$x,y \in (a,b)$ and for all $g \in [f'(x),f'(y)]$ (swapping order as necessary) there is
some $z \in (x,y)$ such that $f'(z) = g$.
In particular, we must have $f'((a,b)) \subset (-\infty,0)$ or $f'((a,b)) \subset (0, \infty)$ (where $f'((a,b)) = \{ f'(x) | s \in (a,b) \}$ because if not, we would have
$f'(m) = 0$ for some $m \in (a,b)$.
Hence $f$ is continuous and strictly monotonic. It is straightforward to prove that $f$ is locally invertible and that the inverse is continuous.
Aside: While the idea is appealing, just having $f'(m) \neq 0$ for a specific
point is not sufficient to guarantee local invertibility. For example,
take $f(x) = {1 \over 2} x + x^2 \sin { 1\over x}$. Then $f'(0) = {1 \over 2} > 0$, but since $f'$ takes both positive & negative values arbitrarily close to $0$ it cannot be monotonic near $0$ and hence does not have a local inverse.
A: Lemma. If $f\!:\ ]a,b[\>\to{\mathbb R}$ is continuous and injective then $f$ is strictly monotone.
Proof. Consider two pairs of points $x<y$ and $u<v$ in $\>]a,b[\>$. Then
$$(1-t)x+ t u< (1-t) y+t v\qquad(0\leq t\leq 1)\ .$$
Therefore the auxiliary function
$$\phi(t):=f\bigl((1-t)y+tv\bigr)-f\bigl((1-t)x+t u\bigr)\qquad (0\leq t\leq1)$$
is never $0$ on the $t$-interval $[0,1]$. Since $\phi$ is continuous it follows that the values $\phi(0)=f(y)-f(x)$ and $\phi(1)=f(v)-f(u)$  have the same sign.
Theorem. If $f\!:\ ]a,b[\>\to{\mathbb R}$ is continuous and injective then $f$ maps $\>]a,b[\>$ bijectively onto the open interval $\>]c,d[\>:=\>]\inf_{a<x<b} f(x),\sup_{a<x<b} f(x)[\>$. The inverse function $g:=f^{-1}\!:\ ]c,d[\>\to\>]a,b[\>$ is automatically continuous.
Proof of the last statement: WLOG we may assume that $f$ and $g$ are increasing. Consider an arbitrary point $\eta\in\>]c,d[\>$, and let $\xi:=g(\eta)\in\>]a,b[\>$. Let an arbitrary, but sufficiently small $\epsilon>0$ be given. Then $f(\xi-\epsilon)<f(\xi)=\eta$, and $f(\xi+\epsilon)>\eta$. The open interval $U:=\>]f(\xi-\epsilon),f(\xi+\epsilon)[\>$ then is a neighborhood of $\eta$, and $g(U)\subset\>]\xi-\epsilon,\xi+\epsilon[\>$, by monotonicity.
