WTS: For two metric spaces $X,Y$ If $f:X \rightarrow Y$ is continuous then for every open set $U\subset Y$, $f^{-1}(U)$ is open. May someone please verify if this proof is correct?
Proof: Assume $f$ is continuous. Let $U$ be an open set in $Y$. Let $x\in f^{-1}(U)$. Since $U$ is open, there exists an $\epsilon>0$ such that $N_{\epsilon}(f(x)) \subset U$. Since the function is continuous, $\exists \delta >0$ such that whenever $p\in f^{-1}(U)$ and $p\in N_{\delta}(x)$ then $f(p)\in N_{\epsilon}(f(x))$. Since $f(p)\in N_{\epsilon}(f(x))$ then $p\in f^{-1}(U)$ and so $N_{\delta}(x) \subset U$.
The question I have is that I think the proof is correct, but I don't see why the $p$ cannot be in the intersection of the $N_{\delta}(x) $. and $f^{-1}(U)$.
May someone please clarify and tell me what I should do to improve the proof? Please?