Continuous if and only if $f^{-1}(\operatorname{Int}(B)) \subseteq \operatorname{Int}(f^{-1}(B))$ $\newcommand{\Int}{\operatorname{Int}}$
- Prove that if function $f:(X,d_X)\to(Y,d_y)$ between metric spaces is continuous if and only if $f^{-1}(\Int(B)) \subseteq \Int(f^{-1}(B)) $ for all subsets $B\subseteq Y$.
I have the general idea about how to prove this, but I'm worried I'm overthinking it and tying myself in knots. Is there anyway I can make the assumption $\Int(B)$ is open?  I could use the open sets definition of continuity?
Could anyone prove a step-by-step simple proof of this? 
 A: $\implies$: Let $a\in f^{-1}(\mbox{int}Y)$. So $f(a)\in \mbox{int}Y$ implies that $B = B(f(a);\epsilon)\subset Y$ for some $\epsilon>0$. Since $f$ is said to be continuous at $a$, then $f^{-1}(B)$ is an open subset of $X$ containing $a$;  since $B\subset Y$, it is also true that $f^{-1}(B)\subset f^{-1}(Y)$. Therefore, by the openess of $f^{-1}(B)$ one can find a ball $B'$ such  that $B'=B(a;\delta)\subset f^{-1}(B) \subset f^{-1}(Y)$, proving that $a\in \mbox{int}f^{-1}(Y)$.
$\impliedby$: This goes in the same way as the anterior answer. It's basically the same, so all the credits goes to Learnmore. I'll just write it here for the answer to be complete.
Let $\mathcal{O}$ be any open subset of $X$. Since it is open, it is true that $\mathcal{O} = \mbox{int}\mathcal{O}.$ Applying the hypothesis it follows that $f^{-1}(\mathcal{O})\subset \mbox{int}f^{-1}(\mathcal{O}) $. Therefore, we have $f^{-1}(\mathcal{O}) = \mbox{int}f^{-1}(\mathcal{O}) $, and hence $f^{-1}(\mathcal{O})$ is open. This proves that $f$ is continuous.
A: Let $f$ be continuous.$\newcommand{\Int}{\operatorname{Int}}$
Let $a\in f^{-1}(\Int B)\implies f(a)\in \Int B$.Now $f$ is continuous at $a\implies \exists U$ open in $X$ such that $f(U)\subset \Int B\implies U\subset f^{-1}(\Int B)$.
Conversely ,Let $U$ be open in $Y$. then $f^{-1}(\Int U)\subset \Int f^{-1}(U)\implies f^{-1}(U)\subset \Int f^{-1}(U)\implies f^{-1}(U)$ is open in $X$.
