Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:6045

[Machine] That the group who prayed with them one unit of prayer, then said salaam and went to their own positions, and these (other) people prayed by themselves one unit of prayer, then returned to their own positions and prayed one unit of prayer for themselves. It has been narrated to us by Muslim ibn Ibrahim, narrated to us by Abdul Samad ibn Habib, narrated to me by my father, that they joined in the expedition with Abdur Rahman ibn Sumrah al-Kabuli and he led us in the prayer of fear. It has been narrated to us by Abu Ali al-Rudhbari, narrated to us by Abu Bakr ibn Dasa, narrated to us by Abu Dawud, and he mentioned this.  

البيهقي:٦٠٤٥وَصَلَّى عَبْدُ الرَّحْمَنِ بْنُ سَمُرَةَ هَكَذَا إِلَّا

أَنَّ الطَّائِفَةَ الَّتِي صَلَّى بِهِمْ رَكْعَةً ثُمَّ سَلَّمَ مَضَوْا إِلَى مَقَامِ أَصْحَابِهِمْ وَجَاءَ هَؤُلَاءِ فَصَلُّوا لِأَنْفُسِهِمْ رَكْعَةً ثُمَّ رَجَعُوا إِلَى مَقَامِ أُولَئِكَ فَصَلُّوا لِأَنْفُسِهِمْ رَكْعَةً حَدَّثَنَا بِذَلِكَ مُسْلِمُ بْنُ إِبْرَاهِيمَ ثنا عَبْدُ الصَّمَدِ بْنُ حَبِيبٍ أَخْبَرَنِي أَبِي أَنَّهُمْ غَزَوْا مَعَ عَبْدِ الرَّحْمَنِ بْنِ سَمُرَةَ كَابُلَ فَصَلَّى بِنَا صَلَاةَ الْخَوْفِ أَخْبَرَنَاهُ أَبُو عَلِيٍّ الرُّوذْبَارِيُّ أنبأ أَبُو بَكْرِ بْنُ دَاسَةَ ثنا أَبُو دَاوُدَ فَذَكَرَهُ