Sunnah.com : Book 5, Hadith 20
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
وعن أبى برزة رضى الله عنه قال: كان رسول الله صلى الله عليه وسلم يقول بآخرة إذا أراد أن يقوم من المجلس: سبحانك الله وبحمدك، أشهد أن لا إله إلا أنت، أستغفرك وأتوب إليك" فقال رجل: يا رسول الله، إنك لتقول قولاً ما كنت تقوله فيما مضى؟ قال: "ذلك كفارة لما يكون في المجلس" (3)."
Abu Barzah (May Allah be pleased with him) reported:
Towards the end of his life, Messenger of Allah (ﷺ) would supplicate before leaving an assembly thus: "Subhanaka Allahumma wa bihamdika, ash-hadu an la ilaha illa Anta, astaghfiruka wa atubu ilaika (O Allah, You are free from every imperfection; all praise is for You. I testify that there is no true god except You, I ask Your forgiveness and turn to You in repentance).'' A man once said to him: "O Messenger of Allah! You have spoken such words as you have never uttered before.'' He said, "It is an expiation of that which goes on in the assembly.'' [Abu Dawud].
Full reference and source
Sunnah.com : Book 5, Hadith 20 Arabic/English book : Book 5, Hadith 833
View source on Sunnah.com (opens in a new tab)