Given two sets $A,\; B$ and that $|A| = |B|$, show that $|2^A| = |2^B|$.
Intuitively, I think this is true, but I am having trouble showing this formally.
I know that there exists a bijection $f: A \to B$ and that we should try to define a map $g: 2^A \to 2^B$ so that we can show $g$ is bijective. However, I am stuck on defining $g$.