Therefore...
Therefore, all the Muslims, whether Shias or Sunnis are unanimous and united over the evidence of Mahdi's existence which means that except for the sayings of Shias and Sunnis, the sayings of other sects is immaterial. In spite of such consensus on this matter and its authenticity we ask: Amongst the two (i.e. Mahdi and Isa) who is having precedence over the other in prayers and battle?!
We reply: Mahdi and Isa are both leaders, one is the Prophet and the other is the Imam; although in a congregation the one who is the Imam shall be the leader over the other who is the Prophet. Besides, none of the two fear from reproach (of others) seeking the path of Allah and both are immaculate from all types of sins such as deceit, showing off (the good deeds) and hypocrisy.
Moreover, none of the two will invite the others towards an act, which is outside the decree of 'Shariat' (religious bindings) and against the Wish of Allah and His Prophet. When such is the affair, then 'Imam' (who is Mahdi) is superior to 'Mamoom' (who is Isa) because, Muhammad's Shariat has commanded as such. The proof of this is what the Holy Prophet (S.A.W.A.) has said: The one whose recitation of Quran is better (than others) shall lead the people.
If it is equal amongst all, then the wisest shall lead and if still they are equal, the most learned shall lead. If yet they are equal, the one who has taken precedence over the others in 'Hijrat' (migration) shall lead and if again they remain the same, the one with a handsome face shall lead. Thus if Mahdi realizes that Isa is superior to him, it is not permissible for Imam to take precedence over Isa in the 'Shariat' since Allah has kept Imam pure and clean from every abominable act.
71-Kanzul-Ummal vol. 7 pg. 187. Also, Suyuti narrate: in Arful-wardi Pg 65 Ibn-Abu Shuaiba that the Holy Prophet (S.A.W.A) maid: 'Mahdi is from this 'Ummah' and he lathe same one behind whom shall pray Isa-ibn- Maryam. On the same page, he has narrated a tradition with similar contents from Ibn-Maaja, Rauyeni, Ibn- Khuzaima, Abu Awaane, Hakem and Abu Na'eem from the Holy Prophet.
Also, he narrate: on page 81 from Huzaifa and on page 83 from 3ibir and the author of 'M-Hawiul-Fatawi' on page 167 narrates from Osman-ibn-Abil Aas, Abu lmamah Baaheli, Ibn Sireen and each in turn from the Holy Prophet a tradition with content that Isa will follow Mahdi in prayers.