وان ذكر كل واحد منهما انه كان مأموما بطلت صلاتهما لان كل واحد منهما قد وكل إلى صاحبه القيام بشرائط الصلاة فلم تصح لهما صلاة
And if two people pray together and each of them remembers that he was intending to be the imam (of prayer), then their prayers are valid. But if each of them remembers that he was intending to follow the other (as a follower), then their prayers are invalid, because each of them entrusted the fulfillment of the conditions of the prayer to the other, so the prayer was not valid for either of them.