We want a notion of reversing functions.
Reversing functions does not make sense if the function is not one-to-one. Let $f: X \to Y$. If $x_1$ goes to $y$ and $x_2$ goes to $y$ (i.e., $f(x_1) = f(x_2) = y$), then what should $y$ go to. One answer is that we should have a function which gives all the domain values which could lead to $y$. This is the inverse image (see Function Images) $f^{-1}(\set{y})$. Nor does reversing functions make sense if $f$ is not onto. If there does not exist $x \in X$ so that $y = f(x)$, then $f^{-1}(\set{y}) = \varnothing$.
In the case, however, that the function is one-to-one and onto, then each element of the domain corresponds to one and only one element of the codomain and vice versa. In this case, for all $y \in Y$, $f^{-1}(\set{y})$ is a singleton $\set{x}$ where $f(x) = y$. In this case, we define a fucntion $g: Y \to X$ so that $g(y) = x$ if and only if $f(x) = y$.
Let $f: X \to Y$ and $g: Y \to Z$. Then $g^{-1}$ maps $\powerset{Z}$ to $\powerset{Y}$ and $f^{-1}$ maps $\powerset{Y}$ to $\powerset{X}$. Then the following is immediate