Abu Bakra reported,

The Prophet ﷺ led the fear prayer at noon. One group lined up behind him while the other faced the enemy. He prayed two rakahs with the first group and then gave the closing salam. Those who had prayed with him went off and took the position of their companions, then the second group came and prayed behind him. He prayed two rakahs with them and then gave the closing salam. So the Messenger of Allah ﷺ performed four rakahs, while each group of his companions performed only two. This is the ruling Hasan used to give.

Abu Dawud 1248

Daif

حدثنا عبيد الله بن معاذ حدثنا أبي حدثنا الأشعث عن الحسن

عن أبي بكرة قال

صلى النبي ﷺ في خوف الظهر فصف بعضهم خلفه وبعضهم بإزاء العدو فصلى بهم ركعتين ثم سلم فانطلق الذين صلوا معه فوقفوا موقف أصحابهم ثم جاء أولئك فصلوا خلفه فصلى بهم ركعتين ثم سلم فكانت لرسول الله ﷺ أربعا ولأصحابه ركعتين ركعتين وبذلك كان يفتي الحسن

أبو داود 1248ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer while traveling
Chapter
Those who say he prays two rakahs with each group
Numbering
Darussalam 1248
Abu Dawud 1248