It is reported from the Prophet ﷺ that he performed the prayer of fear. He prayed two units with the group behind him and two units with the group that came afterward. So the Prophet ﷺ prayed four units in total, while each group prayed two units.
أخبرنا عمرو بن علي قال حدثنا يحيى عن أشعث عن الحسن
عن النبي ﷺ أنه صلى صلاة الخوف فصلى بالذين خلفه ركعتين وبالذين جاءوا ركعتين فكانت للنبي ﷺ أربعا ولهؤلاء ركعتين ركعتين
[Its chain of transmission is daif] Abu Dawud transmitted it, Book of Prayer, Chapter of one who said he prays two rak'ahs with each group, no. 1248, from the hadith of Ashath bin Abdul-Malik, on his authority. It is also in Kubra, no. 910.Hasan Basri was mentioned previously, no. 36. I did not find an explicit statement of his hearing it directly. See the following hadith (1555).