For any function $f:A\rightarrow B$, define a new function $g:P(A)\rightarrow P(B)$ as follows: for every $S \subseteq A$, define $g(S)=\{f(x) \mid x\in S\}$. Prove that $f$ is onto if and only if $g$ is onto.
I'm not sure how to begin, and I'm particularly confused about what exactly $g(S)$ means. Is there any insight that may help me on my way to solve this? How can I show $f$ is onto $ \leftrightarrow g$ is onto?
Thank you!