I need help with the following problem: given the function $f:A \rightarrow B$ with sets $A_0 \subset A$ and $B_0 \subset B$, I need to prove that $f(f^{-1}(B_0)) \subset B_0$ and that equality holds only when $f$ is surjective.
I started with the set $f^{-1}(B_0)$, take $b\in B_0$ I considered three scenarios:
1.- there is just one $a \in A$ such that $f(a)=b$
2.- there is more than one element in $A$, say $a_1, a_2, \dots, a_n \in A$ such that $f(a_i)=b$, $i=1,2, \dots,n$
3.- there is no element $a \in A$ such that $f(a)=b$
So, if we compose $f$ with $f^{-1}(b_0)$, $f(f^{-1}(B_0))$, from points 1 and 2 we'll get back an element $b \in B_0$, but for point 3 $B_0$ might have more elements, $\forall x \in f(f^{-1}(B_0)), x\in B_0$ but $\exists b \in B_0, b \notin f(f^{-1}(B_0))$, hence, $f(f^{-1}(B_0)) \subset B0$.
If $f$ is surjective then there is a guarantee that every $b \in B_0$ will have at least an $a \in A$ such that $f(a)=b$, meaning $f(f^{-1}(B_0)) = B0$
I was told that this is wrong, but I don't have a clue of where the procedure failed, any pointers will be appreciated.