Answer:
Praise be to Allah, the Lord of the World; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Performing two Rak'ahs after committing a sin. Yes, it is proved that
Abu Bakr al-Siddiq (Radiya Allahu Anhu) said: I heard Allah's Messenger (Sallallahu Alaihi wa Sallam) say:
"A slave who commits sin, then he performs Wudu in a good and complete manner and performs two Rak'ahs and seeks Allah's Pardon, Allah will forgive him" . After that the Prophet (Sallallahu Alaihi wa Sallam) recited Allah's statement:
{And those who, when they have committed Fahishah (illegal sexual intercourse etc.) or wronged themselves with evil, remember Allâh and ask forgiveness for their sins; - and none can forgive sins but Allâh - And do not persist in what (wrong) they have done, while they know.} [3: 135]. [
Abu Dawood ,
al-Tirmizi and others].
Allah knows best.