From: Rabbi Moshe Sofer
To: Rabbi Yozpa
Rabbi Yozpa questioned Rashi's claim that all those sentenced to stoning are also hanged, which contradicts the established ruling that only blasphemers and idolaters are hanged. The Chasam Sofer resolves this by showing that R' Elazar b'R' Shimon follows R' Akiva's ribbui u'mi'ut hermeneutical method, under which all stoned criminals are indeed hanged, and that Rashi's comment is tailored to that context. He further suggests that R' Shimon's principle of expounding the Torah's reasons limits the lo salin prohibition to cases of blasphemy and idolatry, though this final point requires further investigation.
Source: Shu"t Chasam Sofer CM §25