Praise be to Allah, and may Allah’s peace and blessings be upon the Messenger of Allah, his family and his companions.
As to what follows:
With regards to answering your question we say, success is by Allah Almighty.
The sunnah way is for a woman to pray in a single row even if she is praying with a mahram (unmarriageable person) or her husband basing of the hadith mentioned in Bukhari (380) and Muslim (658) on the authority of Malik from Ishaq Ibn Abi Twalha from his father Anas Ibn Malik who said that:
“His grandmother, Mulaika, invited the Messenger of Allah (peace be on him) to a dinner which she had prepared. He (the Holy Prophet) ate out of that and then said:
Stand up so that I should observe prayer (in order to bless) you Anas Ibn Malik said: I stood up on a mat (belonging to us) which had turned dark on account of its long use. I sprinkled water over it (in order to soften it), and the Messenger of Allah (peace be on him) stood upon it, and I and an orphan formed a row behind him (the Holy Prophet) and the old woman was behind us, and the Messenger of Allah (peace be on him) led us in two rak'ahs of prayer and then went back.”
However, if a woman prays an obligatory prayer or a nafil besides her husband or mahram, her Prayer will be correct according to the majority of scholars but she would have omitted a sunnah.
And Allah knows best.
Dr. Khalid al-Muslih
13 / 01 / 1425 AH