Can someone verify whether my attempt to prove this theorem is correct?
Notice that I use a generalized definition of derivative:
Let $f: E \subseteq \mathbb{R} \to \mathbb{R}$ be a function. Let $p$ both a point and a limit point of $E$. Then we define the derivative of $f$ at $p$ as the limit $f'(p) = \lim_{x \to p, x \in E \setminus \{p\}} \frac{f(x)-f(p)}{x-p}$, provided the limit exists.
Theorem: Let $f: E \subseteq \mathbb{R} \to F \subseteq \mathbb{R}$ be an invertible function that is differentiable at $p \in E$. Suppose that $f^{-1}: F \to E$ is continuous at $f(p)$ and that $f'(p) \neq 0$. Then $f^{-1}$ is differentiable at $f(p)$, and we have
$$(f^{-1})'(f(p)) = \frac{1}{f'(p)}$$
Proof: Before proving the theorem, we have to check that differentiation at $f(p)$ makes sense: we have to show that $f(p)$ is a limit point of $Y$.
Let $\epsilon > 0$. Because $f$ is differentiable at $p$, $f$ is continuous at $p$ and it follows that $|f(p)-f(x)| < \epsilon$ whenever $x \in (p- \delta, p + \delta) \cap E \setminus \{p\}$ for some $\delta > 0$. Notice: $f'(p) \neq 0$ implies that $f$ is not constant on $(p- \delta, p + \delta) \cap E \setminus \{p\}$ (if it were constant, we would have $f'(p) = \lim_{x \to p} \frac{f(x)-f(p)}{x-p} = \lim_{x \to p, x \in E \cap (p- \delta, p + \delta)\setminus \{p\}}\frac{f(x)-f(p)}{x-p} = 0)$. Combining these facts, we deduce that $0 < |f(x)-f(p)| < \epsilon$ for some $x \in E$, and $f(p)$ is a limit point of $F = f(E)$.
Define $$F: E \to \mathbb{R}: x \mapsto \begin{cases} \frac{f(x)-f(p)}{x-p} \quad x \neq p \\ f'(p) \quad x = p\end{cases}$$
Clearly, $F$ is continuous at $p$.
The theorem now follows from the following easy calculation:
$$(f^{-1})'(f(p)) = \lim_{y \to f(p)} \frac{f^{-1}(y)- f^{-1}(f(p))}{y-f(p)}$$
$$= \lim_{y \to f(p)}\frac{1}{\frac{f(f^{-1}(y))-f(p)}{f^{-1}(y)- p}}$$
$$ = \lim_{y \to f(p)} \frac{1}{F(f^{-1}(y))}$$
$$= \frac{1}{F( \lim_{y \to f(p)} f^{-1}(y))} = \frac{1}{F(p)} = \frac{1}{f'(p)}$$
However, some equalities need some explanation. The second equality is justified by noticing that $f^{-1}(y) - p = f^{-1}(y) - f^{-1}(f(p))$ is zero only when $y = f(p)$, so there are no trouble with dividing by zero. The fourth equality uses the continuity of $F$ at $p$ and the fifth equality follows from the continuity of $f^{-1}$ at $f(p) \quad \square$