The Prophet ﷺ led them in the afternoon or noon prayer. He stood up after the second rakah, and they said "subhan Allah" to alert him, but he continued with his prayer. When he had completed the prayer, he performed two prostrations, then gave the salam.
أن النبي ﷺ صلى بهم صلاة العصر، أو الظهر، فقام في الركعتين، فسبحوا به فمضى في صلاته. فلما قضى الصلاة سجد سجدتين، ثم سلم.
Bazzar narrated it in Kashf Astar (576) from Hasan bin Yahya Azdi, who said, Abu Zayd Saeed bin Rabi narrated to us, Ali bin Mubarak narrated to us, from Yahya bin Abu Kathir, from Damdam bin Jaws, from Abu Hurairah, and he mentioned something similar. Haythami said in Majma (2/151), Bazzar narrated it and its narrators are trustworthy.On this subject there is also a report from Ata bin Abu Rabah, who said, Ibn Zubayr led the people in the Maghrib prayer, and he gave the taslim within it, that is, after the first two rakats, then got up to touch the Black Stone, so the people exclaimed "Subhan Allah" at him, so he went back and prayed the remaining rakat. Then he gave the taslim and performed two prostrations. This was mentioned to Ibn Abbas, and he said, "He did not depart from the sunnah of his Prophet ﷺ." In another version, "He got it right, and they got it right."Abu Yaala, Ahmad, Bazzar, Ibn Abu Shayba, Abdul-Razzaq, Musaddad, Abu Dawud Tayalisi, Harith bin Abu Usama, and Bayhaqi all narrated it through multiple chains from Ata bin Abu Rabah, but none of their versions mention any taslim within the prayer.There is also a report from Saad bin Abu Waqqas, narrated by Bazzar, Kashf Astar (575), as well as by Abu Yaala, Ahmad bin Mani, and Hakim (1/322–323), though the correct view is that it goes back only to the Companion himself and not to the Prophet, as Bazzar stated.Haythami said in Majma (2/151), Abu Uthman Amr bin Muhammad Naqid said, "We have not heard anyone raise this hadith to the Prophet except Abu Muawiya."