If there is a mapping of $B$ onto $A$, then $2^{|A|} \leq 2^{|B|}$. [Hint: Given $g$ mapping $B$ onto $A$, let $f(X)=g^{-1}(X)$ for all $X \subseteq A$]
I follow the hint and obtain the function $f$. If $f$ is injective, then the statement is proven.
Question: Why does $g^{-1}$ exist in the first place? How do we know $g$ is injective? The hint given seems a bit weird.
Can anyone explain to me?
It exists for all maps. Here, it does not denote the inverse, but the pre-image map,
$$g^{-1}(X) = \{b\in B : g(b)\in X\}.$$
Now use the surjectivity of $g$ to deduce the injectivity of $g^{-1}$.