Sahl bin Abi Hathmah (may Allah be pleased with him) said regarding the fear prayer: The imam stands facing the qiblah, one group of them is with the imam and the other group is towards the enemy, with their faces towards the enemy. The imam leads them in one rak'ah, and they perform the bowing and prostrations by themselves, that is, for the second rak'ah. Then they go to the place of the others, and those pray one rak'ah with the imam and then complete the bowing and prostrations of the second rak'ah. In this way the imam will have two rak'ahs and they will have one rak'ah (with him).
In the hadith of Musaddad: Those who prayed one rak'ah with the imam should pray the second rak'ah by themselves.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخوف / 6012