Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 3.2 Exercise 3.2.12
Let $G$ be a group and $H \leq G$. Prove that the map $x \mapsto x^{-1}$ sends each left coset to a right coset (of $H$), and hence $|H \backslash G| = |G/H|$.
Solution: (This is a slightly different approach.)
Define $\psi : G \rightarrow H \backslash G$ by $\psi(x) = Hx^{-1}$. Suppose $y^{-1}x \in H$; then $y^{-1} \in Hx^{-1}$. and we have $$Hy^{-1} = Hx^{-1},$$ so $\psi(x) = \psi(y)$. By Lemma 1 to Exercise 3.2.10, this induces a mapping $\varphi : G/H \rightarrow H \backslash G$ given by $$\varphi(xH) = Hx^{-1}.$$ $\psi$ is clearly surjective, so $\varphi$ is surjective.
Now suppose $\varphi(x) = \varphi(y)$; then $Hx^{-1} = Hy^{-1}$, so that in particular $y^{-1} \in Hx^{-1}$ and hence $$y^{-1}x \in H\Longrightarrow xH = yH.$$ Hence $\varphi$ is a bijection.