Prove that the $\epsilon-\delta$ definition is equivalent to the topological definition of continuity
Below is a proof from Munkres' Topology A First Course
I understand everything in the proof except for the final argument. I don't understand how $x \in B_{(X, d_x)}(x, \delta) \subset f^{-1}(V)$ implies that $f^{-1}(V)$ is open.
For example a closed set could contain an open set, but that doesn't mean that the closed set is open.
Take $[0, 1] \subset \mathbb{R}$, $(\mathbb{R}, d)$ is certainly a metric space with the standard euclidean metric $d$, and the open ball centered at $\frac{1}{2}$ with radius $\frac{1}{3}$ is contained in $[0, 1]$ but $[0, 1]$ is not open, i.e. $B_{(\mathbb{R}, d)}(\frac{1}{2}, \frac{1}{3}) \subset [0, 1]$, but $[0, 1]$ is not open.
So my question is how is the final argument valid?

