I know that $f(\overline{S}) = \overline{f(S)}$ if and only if $f: X \rightarrow Y$ is an homeomorphism, you can find a proof here.
I am trying to establish a proof of the $\impliedby$ part, but I don't know whether it is correct or I am missing something.$$f(\overline{S}) = f(\cap_{S \subseteq E \subseteq X, \, E \, closed} E) = \cap_{S \subseteq E \subseteq X, \, E \, closed} f(E) = \cap_{E \subseteq Y \mid S \subseteq f^{-1}(E) \subseteq X, \, f^{-1}(E) \, closed} E = \cap_{E \subseteq Y closed \mid S \subseteq f^{-1}(E) \subseteq X} E = \cap_{S \subseteq E \subseteq Y, \, E \, closed} E = \overline{f(S)}$$where the first equality is one of the definition of closure; the second that functions and intersections can be exchanged; the third is renaming $E$ to $f^{-1}(E)$, and up to now I think I only used, in the third equality, that $f$ is a bijection, but not the continuity of $f$ and $f^{-1}$ yet. Then, in the fourth equality the continuity of $f$ is used to get that if $E$ is closed then $f^{-1}(E)$ is closed, and the continuity of $f^{-1}$ is used to have that if $f^{-1}(E)$ is closed, then $E$ is closed. To conclude, the fifth equality is just rewriting the condition applying $f$, and the last the definition of closure.
I am not particularly confident about my reasoning for the third and fourth inequality, somehow I am always confused by changing variables in summations, intersections, etc. Are my steps correct? Or what am I missing?