$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?