Al-Ilmam bi-Ahadith al-Ahkam 281
وَرَوَى البُخَارِيّ من حَدِيث ابْن جريج، عَن مُوسَى بن عقبَة، عَن نَافِع، عَن ابْن عمر، قَالَ نَحوا من قَول مُجَاهِد: إِذا اختلطوا قيَاما. وَزَاد ابْن عمر عَن النَّبِي ﷺ : " وَإِن كَانُوا أَكثر من ذَلِك فليصلوا قيَاما وركباناً إِلَى الْقبْلَة وَغير الْقبْلَة " . وَهَذَا الَّذِي أَشَارَ إِلَيْهِ من قَول مُجَاهِد، أخرجه الْبَيْهَقِيّ بِلَفْظ: " إِذا اختلطوا فَإِنَّمَا هُوَ الْإِشَارَة بِالرَّأْسِ وَالتَّكْبِير.
And al-Bukhari narrated, from the hadith of Ibn Jurayj, from Musa ibn ʿUqbah, from Nafiʿ, from Ibn ʿUmar, who said something similar to the statement of Mujahid: "When they are mixed together, [they pray] standing." And Ibn ʿUmar added from the Prophet ﷺ: "And if they are more than that, let them pray standing and riding, towards the qiblah and other than the qiblah." And the statement of Mujahid that he referred to, al-Bayhaqi recorded it with the wording: "When they are mixed together, it is only gesturing with the head and the takbir."