Let $\displaystyle f$ be a function from $\displaystyle X$ onto $\displaystyle Y$ and let $\displaystyle B \subset Y$. Show that $\displaystyle f(f^{-1}(B))=B$.

I was thinking of something along the lines of

let $\displaystyle b \in B \ \& \ x \in X $ then $\displaystyle f^{-1}(b) = x \longrightarrow f(f^{-1}(b)) = f(x) = b$, since it's onto and it's pretty much by definition. I'm not quite sure that this is correct.