The Prophet ﷺ combined the Maghrib and Isha prayers at Jam, performing each one with its own iqamah, and he did not pray any voluntary prayers between them or after either of them.
جمع النبي ﷺ بين المغرب والعشاء بجمع كل واحدة منهما بإقامة، ولم يسبح بينهما ولا على إثر كل واحدة منهما.
Bukhari narrated it in the Hajj chapter (1673) via Ibn Abu Dhib, from Zuhri, with the same wording, and he added, "Each of the two prayers was preceded by a separate call to prayer (iqamah), and he did not offer any voluntary prayer between them, nor after either of them."Muslim also narrated it (1288:287) via Yunus, from Ibn Shihab, from Ubaydullah bin Abdullah bin Umar, from his father, who said, "The Messenger of Allah combined Maghrib and Isha at Jam, with no sajdah between them. He prayed Maghrib as three units and Isha as two units." Abdullah continued to pray in this manner at Jam until he met Allah, the Exalted.