The definition I use for continuity is as follows: $f:X\to Y$ (X and Y are metric spaces) is continous means that: $\forall y\in X$ held constant,$\forall \varepsilon >0$ $\exists \delta$, s.t for all x satisfying $d_X(x,y)<\delta$: $d_Y(f(x),f(y))<\varepsilon$.
Let $V\subset Y$ be an open set.
I mananged to show that if f is continous then $f^-1(V)$ is an open set. However I can't manange to prove the other way around, because $d_Y(f(x),f(y))$ can be smaller than epsilon, yet $d(x,y)$ can still be greater than delta. Can someone help me prove that if $f^-1(V)$ is an open set then f is continous?