Let $f$ be a map between topological spaces $f : X \to Y$ such that for every $A \subset X$ we have that $f(\operatorname{int} A) = \operatorname{int} f(A)$. Prove $f$ is continuous.
I think I can prove the converse isn't true, any continuous non-open map should do, take $f : \mathbb{R} \to \mathbb{R} : x \mapsto x^2$ with the standard topology, and $A = \mathbb{R} = \operatorname{int}A$. Then $f(\operatorname{int}A) = [0, +\infty) \neq (0, +\infty) = \operatorname{int}f(A)$
I have no clue how to prove this. I have tried using the fact that $f$ is continuous if $f(\overline{B}) \subset \overline{f(B)}$ for all $B$, but I can't seem to construct the right $A$ that implies this.
From a rough sketch given by the TA of the course, I was able to formulate a proof.
Consider an open $B \subset Y$. Let $A = f^{-1}(B)$. Let $C = A \setminus \operatorname{int} A$. The goal is to prove $C$ is empty.
Consider now $G = C \cup (A \setminus f^{-1}(f(C)))$. Then $f(G) = f(A) = B$. By the assumption, $f(\operatorname{int} G) = \operatorname{int}(f(G)) = \operatorname{int} B = B$
Now $\operatorname{int}G =\operatorname{int} C \cup \operatorname{int}(A \setminus f^{-1}(f(C))) = \operatorname{int}(A \setminus f^{-1}(f(C)))$, as $C$ has an empty interior. Therefore $f(\operatorname{int} G) = f(\operatorname{int} (A \setminus f^{-1}(f(C))) = B$ so it follows that $ B = f(A \setminus f^{-1}(f(C))) = f(A) \setminus f(C) = B \setminus f(C)$
So $B = B \setminus f(C)$, which implies that $f(C) = \varnothing$ and thus $C = \varnothing$, so $A$ is open, and we can finally conclude that $f$ is continuous.