Trouble Understanding Continuity Theorem I am looking at Calculus on Manifolds by Michael Spivak, but there's a theorem that I don't quite understand.

1-8 Theorem. If $A \subset \mathbb{R}^n$, a function $f: A \to \mathbb{R}^m$ is continuous if and only if for every open set $U\subset \mathbb{R}^m$ there is some open set $V\subset \mathbb{R}^n$ such that $f^{-1}(U) = V\cap A$.

I couldn't figure out why the converse (if the conditions hold, then the function is continuous) was true so I drew a random injective function on a set $A$ with a hole. Now, I'm trying to find a open set $U$ in which there is a contradiction. Can anyone help?
 A: (Here I am using the terminology of the book, see my comment under the question.)
Assume for every open set $U\subset {\mathbf R^m}$ there is some open set $V\subset {\mathbf R^n}$ such that $f^{-1}(U)=V\cap A$. Let $a\in f^{-1}(U)$, where $U$ is open. Because $U$ is open, there is some open rectangle $B$ with $f(a)\in B\subset U$. Then $f^{-1}(B)$ is open in ${\mathbf R^n}$, thus for any interval of size $\epsilon$ in ${\mathbf R^m}$ we can find an interval of size $\delta$ in $A$ such that if $|x-a|<\epsilon$, $|f(x)-f(a)|<\delta$.
The statement of the proof looks like it is saying more than that, but it isn't. Basically it just says that if the inverse image of an open set is an open set, we can wangle that into the epsilon delta definition of continuity. As the book says that is a "pleasant surprise".
A: Suppose the condition holds. Let $\epsilon > 0$ and $x_0\in A$. Now let$U=\{x| |x-f(x_0)|<\epsilon\}$ is open in $\Bbb{R}^m$. By hypothesis, there is a $V$ open in $\Bbb {R}^n$ such that $f^{-1}(U)=V\cap A$. So there is a $\delta>0$ such that $|x-x_0|<\delta$ and $x\in V\cap A$ implies $x\in U$. That is $|f(x)-f(x_0)|<\epsilon$.
