[And the two who commit it among you], meaning: the indecency, [then punish them both] verbally, [then if they repent and amend themselves], the rest of the verse.
Then this verse was revealed: [And keep them in houses until death takes them or Allah ordains for them a way], meaning: an exit from confinement, according to the tafsir of al-Suddi. Then, there was revealed in Surah al-Nur: [The woman and the man guilty of adultery or fornication, flog each of them with a hundred stripes]. [Verse 17 - 18]