Prove that $\overline{A}=\overline{B}$ implies that, for $f:X\rightarrow Y$ continuous, $\overline{f(A)}=\overline{f(B)}$ $A,B$ are subsets of $X$. 
$X,Y$ are topological spaces.
My work:
$\overline{A}=\overline{B}$ contains both $A$ and $B$.
As $\overline{f(A)}$ is closed and $f$ is continuous, $f^{-1}(\overline{f(A)})$ is closed. It contains $A$, and hence contains $\bar{A}=\bar{B}$. Similarly, $f^{-1}(\overline{f(B)})$ also contains $\bar{A}=\bar{B}$. 
But why should $f^{-1}(\overline{f(A)})$ and $f^{-1}(\overline{f(B)})$ be equal?
Any hints?
 A: We have $B \subseteq \overline A$. So $f(B) \subseteq f( \overline A )$ holds.
Also, this post shows that $f$ being continuous implies that $f( \overline A) \subseteq \overline{f(A)}$.
Hence $f(B) \subseteq \overline{f(A)}$. Since $\overline{f(A)}$ is closed,  $\ \overline{f(B)} \subseteq \overline{f(A)}$.
Similarly, $\ \overline{f(A)} \subseteq \overline{f(B)}$.
Therefore $\ \overline{f(A)} = \overline{f(B)}$.
A: We may use the fact that 

$\overline A$ is the set of all limits of convergent sequences in $A$.

Let $k \in \overline A $ and $k\in \overline B$, since $\overline A = \overline B$. Thus, there are sequences $x_n, y_n$ in $A, B$ respectively, such that:
$$\lim_{n\to\infty} x_n = \lim_{n\to\infty} y_n = k.$$
Also, $f$ is continuous, which means:
$$\lim_{n\to\infty} f(x_n) = \lim_{n\to\infty}f(y_n) = f(k).$$
However, the sequences $f(x_n)\subset f(A)$ and $ f(y_n)\subset f(B)$ converge, whose limits are in $\overline {f(A)}$ and $\overline{f(B)}$ respectively. This means $f(k)$ is in $\overline {f(A)}$ and $\overline {f(B)}$, as well.
Since $k$ was chosen randomly, it holds that $\overline {f(A)} = \overline {f(B)}.$
