The noon prayer would start and one would go to al-Baqi' and after having relieved himself he would perform ablution and then come, while the Messenger of Allah ﷺ would be in the first rak'ah, because he would prolong it so much. (Using translation from Muslim 454a)
لَقَدْ كَانَتْ صَلَاةُ الظُّهْرِ تُقَامُ لِرَسُولِ اللهِ ﷺ فَيَذْهَبُ الذَّاهِبُ إِلَى الْبَقِيعِ فَيَقْضِي حَاجَتَهُ ثُمَّ يَتَوَضَّأُ ثُمَّ يَأْتِي وَرَسُولُ اللهِ ﷺ فِي الرَّكْعَةِ الْأُولَى مِمَّا يُطَوِّلُهَا