´It was narrated that 'Ammar said:` "The Janazah of a boy and a woman were brought. The boy was placed closer to the people and the woman was placed beyond him, and the funeral prayer was offered for them. Among the people were Abu Saeed Al-Khudri, Ibn Abbas, Abu Qatadah and Abu Hurairah. I asked them about that and they said: '(It is) Sunnah."'
Explanation & Benefits
Hafiz Muhammad Ameen
1979. Commentary: If there are multiple deceased persons, their funeral prayer (janazah) can be performed at the same time, whether they belong to the same gender or different genders, whether they are children or adults. However, the men should be placed closer to the imam, and the women should be placed behind the men. If the general supplication (du'a) for the deceased is recited, it will suffice for all of them.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 1979