Split into two cases, based on whether the groups are finite. For functions between finite sets of the same size (especially homomorphisms between finite groups of the same size), surjectivity implies bijectivity. For the infinite case, it should be easier to show that the kernel is trivial.