Praise be to Allah.
When a woman prays behind an imaam, it is not essential for her to see him or some of the people who are praying behind him, but the rows have to be straight and the women who are praying should be within the boundaries of the mosque and be able to hear the voice of the imaam, so that they can follow him. If women are unable to hear the imaams voice for some reason, then they should pray individually, or in a jamaaah with other women, if they cannot hear the imaams voice or follow him. If a woman enters the mosque and hears the imaam saying takbeer, she should not follow him in saying takbeer until she knows whether he is in sujood or rukoo etc. The way out of this dilemma if she cannot see the imaam or any members of the congregation is to wait until the imaam says sami Allaahu liman hamidah, then she can pray with him. Ibn Abd al-Barr said in al-Kaafi (1/212): Everyone who can see or hear the imaam, and knows where he is in the prayer, and is behind him, it is permissible for him to follow him in prayer. This is the Maaliki view. And Ibn Qudaamah said: If there is a barrier between the imaam and the person who is following him, which prevents him from seeing the imaam or the people praying behind him, then there are two views narrated from Ahmad, one of which says that it is not valid for him to pray behind him and the second view is: it is valid because he can follow the imaam without seeing him, as a blind person does. But for his following the imaam to be valid, he has to be able to hear him. (al-Mughni, 2/208)
In conclusion, if you are inside the mosque and you can hear the imaams voice and you know where he is in the prayer, then follow him, otherwise pray by yourself or with a group of women after the imaam finishes the prayer.With regard to whether your prayer is valid or not, we asked Shaykh Muhammad ibn Saalih al-Uthaymeen, and he replied that to be on the safe side you should repeat the prayer. And Allaah is the source of strength.