Let $x \in A$. Let $y = f(x)$. Then $y = f(x) \in f(A)$. Then, as $y = f(x)$ and $y \in f(A)$, it follows that $x \in f^{-1}(f(A))$. Therefore $A \subseteq f^{-1}(f(A))$.
But is it a proper subset?
Let $w \in f^{-1}(f(A))$ but maybe $w \notin A$. Then there some $y \in f(A)$ such that $f(w) = y$. As $y \in f(A)$, there exists some $x \in A$ such that $f(x) = y$. So $f(w) = f(x)$. Does it follow that $x = y$? If $f$ is one-one the $w = x \in A$ and $A = f^{-1}(f(A))$. But if $f$ is not one-one, $w$ need not equal $x$ and $w$ need not be in A. (Consider $f(x) = x^2$ and $A = [0, \infty)$. $(-1)^2 = (1)^2$ so $-1 \in f^{-1}(f(A))$ but $-1 \notin A$)
So if $A \subseteq f^{-1}(f(A))$ with equality holding if $f$ is one-to-one.
Okay. Now I have to admit I must be missing something. Because the only choice we are given is "if and only if". And I don't see the "only if" part. Let $A = $ the Real numbers. Let $f(x) = x^2$. Then $B = [0, \infty)$ and $f^{-1}(f(A)) = A$. So "only if" doesn't seem to hold to me. Maybe I'm missing something.
======
Ah I see! The are saying not that equality holds for some A, but for all A.
Okay, proving the "only if part":
Suppose $f$ were not one-one. Then there exist some $x, w; x \ne w, f(x) = f(w)$. Find a subset A that contains $x$ but doesn't contain $w$. Then $w \in f^{-1}(f(A))$ but $w \notin A$. So equality "only if" f is one-to-one.
So in my supposed counter example. "Let $f(x) = x^2$. Then $B = [0, \infty)$ and $f^{-1}(f(A)) = A$." I could then find A' = all the reals except -1 (or better yet $[0, \infty)$). So $f^{-1}(f(A'))$ is still the Real Numbers but $A' \ne $ the Real Numbers.