Let $\displaystyle f: (M,d)\to (N,p)$. Prove that f is continuous if and only if $\displaystyle f(\text{cl}(A))\subset \text{cl}(f(A))$ for every $\displaystyle A \subset M$ if and only if $\displaystyle f^{-1}(\text{int}(B))\subset \text{int}(f^{-1}(B)) $ for every $\displaystyle B \subset N$.

Give an example of a continuous f such that $\displaystyle f(\text{cl}(A)) \ne \text{cl}(f(A))$ for some $\displaystyle A \subset M$.

I have shown that the closure case is true, i need some help on the interior case and the example.

I was told to use the fact that inverse image of every open set is open