Prove $f: \mathbb{R}^d \to \mathbb{R}$ is continuous iff $f^{-1}(O)$ is open for any open set $O \subset \mathbb{R}$.
Proof $(\implies)$. We need to show that any point $x\in f^{-1}(O)$ is an interior point.
Let $f(x) \in O$. Since $O$ is open there exists a ball $B_\epsilon\left(f(x)\right) \subset O$, for some $\epsilon > 0$. Since $f$ is continuous, we are guaranteed there exists a $\delta_\epsilon > 0$ such that
\begin{align} f\left(B_{\delta_\epsilon}(x)\right) \subset B_\epsilon\left(f(x)\right) \subset O \end{align}
Since $B_{\delta_\epsilon}(x)$ is in part of the domain of $f$ which maps to the open set $O$, it must be in $f^{-1}(O)$. And since $x$ is arbitrary, then for any $x\in f^{-1}(O)$, there exists a ball around $x$ that's completely contained in $f^{-1}(O)$. Therefore $f^{-1}(O)$ is open.
Proof $(\impliedby)$ Let $f^{-1}(O)$ be open for any open set $O$ in $\mathbb{R}$ and let $\epsilon >0$. We need to show we can find an open ball $B_{\delta_\epsilon}(x)$ in $f^{-1}(O)$, such that
\begin{align} f\left(B_{\delta_\epsilon}(x)\right) \subset B_\epsilon\left(f(x)\right) \end{align}
So, choose $\delta = \frac{|f(x) - \epsilon|}{2}$... [stuck here]