"and you shall hang him": I might think that all who are stoned are hanged (i.e., suspended thereafter); it is, therefore, written (Ibid. 21:23) "for (the penalty for) the cursing of G-d is hanging" (after stoning). After Scripture included (all capital offenses) and then excluded (i.e., limited it to the cursing of G-d [megadef]), we derive it (the exclusion) from megadef, viz.: Just as megadef is distinct in that it constitutes rebellion against G-d, and it is subject to hanging, so, all who rebel against G-d are hanged.

R. Eliezer says: Just as megadef is distinct in that he is stoned, so, all who are stoned are hanged (afterwards). I might think that he is to be hanged while alive; it is, therefore, written "then he shall be put to death" (and, only afterwards, "and you shall hang him.").