Muaz used to pray with the Prophet ﷺ, then return and lead his people in prayer.
حدثنا مسدد حدثنا سفيان عن عمرو بن دينار سمع
إن معاذا كان يصلي مع النبي ﷺ ثم يرجع فيؤم قومه
Muslim narrated it in the chapter on prayer, section on recitation in the night prayer, hadith 465, from the hadith of Sufyan bin Uyayna, with this wording. Bukhari also narrated it (hadith 701), as did others, from the hadith of Amr bin Dinar, with this wording.