Why does the inverse image of V being open imply that it is a neighborhood?

So, I'm currently looking through Rudin's Principles of Mathematical Analysis, specifically Theorem 4.4, which says:

A mapping f of a metric space X into a metric space Y is continuous on X if and only if $f^{-1}(V)$ is open in X for every open set V in Y.

In the second part of the proof, where we suppose that $f^{-1}(V)$ is open in X for every open set V in Y (also fix $p\in X$ and $\epsilon >0$), he makes the statement that "$f^{-1}(V)$ is open; hence there exists $\delta >0$ such that $x\in f^{-1}(V)$ as soon as $d_X(p,x)<\delta$."

Doesn't this imply that $f^{-1}(V)$ is a neighborhood of p with radius $\delta$? Why can we say that, just because this set is open and is an inverse image, that it acts as a neighborhood? Can someone see what I'm missing here?

I looked through other pages, but the closest I could find were this and this, but the first deals with a different theorem from baby Rudin and the second is already assuming an interval in the answer.

• What is your definition of open? Dec 13, 2017 at 3:02
• Notice that the open ball of radius $\delta$ isn’t necessarily equal to all of $f^{-1}(V)$ but rather it sits Inside it. So the author isn’t claiming that $f^{-1}(V)$ is a ball, but rather contains one. Dec 13, 2017 at 3:06

Saying that $U\subset X$ is open is the same as saying that for any $x\in U$, there exists a $\delta>0$ such that the ball of radius $\delta$ centered at $x$, $N_x(\delta) = \{ y \mid d(x,y)<\delta\}$ (using Rudin's notation), is contained in $U$. This is Definition 2.18 in Rudin.
In the proof of Theorem 4.8, Rudin takes $V = N_{f(p)}(\epsilon)$, which is open. By hypothesis, $f^{-1}(V)$ is open, and contains $p$ (since $p \in V$). Thus, by definition, there is a $\delta>0$ such that $N_p(\delta) \subset f^{-1}(V)$.