$f:X \to Y$ is continuous if and only if for every subset A of $X$, $f(\overline{ A}) \subseteq \overline{f(A)}$ In an exercise I am asked to prove the following:

Let $(X,\tau)$ and $(Y,\tau_1)$ be topological spaces and let $f:(X,\tau)\to(Y,\tau_1)$. Prove that $f$ is continuous if and only if for every subset A of $X$, $f(\overline{ A}) \subseteq \overline{f(A)}$.

I always find myself having some trouble with problems involving the closer of a set, so I confess that I can't think of a way to approach this problem. Could someone please tell me some tips and/or tell me how I should start my proof or just some things to have in consideration when solving this? As I want to solve this myself I am not asking for a proof for this statement, so if you do want to answer one please mark it as a spoiler.

P.S.: There is another question that I have but it's very short and I don't think that it's enought to have a post of it's own, the question is:

If $f:(X,\tau) \to (Y,\tau_1)$ is continuous does that mean that $\forall A \in \tau, \exists B \in \tau_2: f^{-1}(B) = A$? I don't think that this assumption is true but I can't think of any counter examples so I wanted to confirm.

 A: You can use the fact that $\overline{B}$ is the minimal closed set containing $B$, for any subset $B$.
If $f$ is continous, and $A \subseteq X$, $\overline{f[A]}$ is closed in $Y$ so $f^{-1}[\overline{f[A]]}$ is closed in $X$ (Here we use the continuity of $f$).That set clearly contains $A$ (why?) so... and then finish the proof to show the inclusion.
If $f$ obeys the closure property, let $C$ be any closed in $Y$. Define $D = f^{-1}[C]$ and apply the property of $f$ to $D$ to show that $D$ is in fact closed and conclude that $f$ is continuous (as $C$ was arbitrary).
A: Okay, so you want to use the definition of closure for direction. Remember that the closure of $A\subseteq X$ is the set of all those points $x\in X$ such that there is a neighbourhood $U\ni x$ with $U\cap A\neq\emptyset$. Can you now show the same property for $f(x)$? This will give you the continuous $\Rightarrow$ $f(\overline{A}) \subseteq \overline{f(A)}$ part. For the other direction, choose any closed $B\subseteq Y$ and set $A=f^{-1}(B)$, then try to show $A$ is closed.
A: Exactly as the other answer says, the correct way to approach a proof like this (actually, any proof at all) is to think carefully about the relevant definitions and how they can be used. There are many equivalent definitions of "closure", so I'll give an example of the same kind of thinking that Nelli used, but with a different definition.
Definition. The closure $\overline{A}$ of a subset $A$ of a topological space $X$ is the intersection of all closed subsets of $X$ which contain $A$ as a subset.
Sketch of $({\!\implies\!})$. First, assume $f$ is continuous. We wish to prove that $f(\overline{A}) \subseteq \overline{f(A)}$ for all $A \subseteq X$, so let $A$ be an arbitrary subset of $X$. Now we wish to show that $f(\overline{A}) \subseteq \overline{f(A)}$ for this particular (arbitrary) set $A$ we chose, so let $y \in f(\overline{A})$ be arbitrary. By definition, there is some $x \in \overline{A}$ such that $f(x) = y$. We wish to show that $y \in \overline{f(A)}$, which by definition means we must show that $y$ is an element of every closed subset of $Y$ which contains $f(A)$. Thus, let $D$ be an arbitrary closed subset of $Y$ such that $f(A) \subseteq D$. [You must fill in this part], therefore $y \in D$. Since $D$ was arbitrary, we conclude that $y \in \overline{f(A)}$. Since $y$ was arbitrary, we conclude that $f(\overline{A}) \subseteq \overline{f(A)}$. Since $A$ was arbitrary, this completes the proof of the forwards direction.
