It is narrated from Anas (may Allah be pleased with him), he states: I and a small child offered prayer behind the Prophet (ﷺ) in our house, and Umm Sulaym (may Allah be pleased with her) was behind us.
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 286
Hadith Takhrijاخرجہ البخاری، الاذان، باب المرأة وحدہا تکون صفا: 727۔