Is the following true?
Let $A, B \subseteq \Bbb R$ and let $f : A \to B$ be a bijective map. Then
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;f$ is continuous on $A$ $ \iff $ $f^{-1}$ is continuous on $B$
It seems like such an obvious result but I can't seem to prove it. At least is the result true if we restrict $A$ and $B$ to be intervals?
My Attempt at a Proof:
$\implies $: Let $b \in B$. I was going nowhere after considering an arbitrary sequence $ (x_n) $ in $B$ which converges to $b$. So I instead assumed that $V$ was any neighbourhood around $f^{-1}(b)$. Now suppose there is no neighbourhood $U$ of $b$ such that $ x \in U \implies f^{-1}(x) \in V $. But for every neighbourhood $U'$ of $b$ there is a neighbourhood $V'$ of $f^{-1}(b)$ such that $ f^{-1}(x) \in V' \implies x \in U' $. This is by considering $b = f(f^{-1}(b))$ and since $f$ is continuous. If one of these $V'$s is a subset of $V$ then we are done. But suppose not. I cannot proceed further. I considered arbitrarily small neighbourhoods $U'_n = \{ x \ | \ |x - b| \lt \frac 1 n \}$ but still got nowhere.
Any help is appreciated.