All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If what you said about the way your husband and his other wife treated your daughter is true, then there is no doubt that this is a great affliction and an offense against her.
Indeed, you did well by advising your daughter not to cut her relationship with her father; no matter what her father does to her, he remains her father. She is obliged to be kind and dutiful to him and she is not permitted to sever ties with him under any circumstances. For more benefit about dutifulness to the parents, please refer to Fataawa 87019 and 84942.
It is very serious that your daughter has stopped praying as this is a grave major sin, and some scholars are of the view that abandoning the prayer, even out of laziness, is an act that takes a person out of the fold of Islam as underlined in Fatwa 84235. Therefore, you should advise her gently and explain to her that she should struggle not to respond to the whispers of the devil, as he tries to always remind her of what happened between her and that woman in order to keep her away from praying and make her believe that abandoning the prayer is a trivial matter. Allaah says (what means): {Indeed, Satan is an enemy to you; so take him as an enemy. He only invites his party to be among the companions of the Blaze.}[Quran 35:6]
On the other hand, we advise you to supplicate for her much, as the supplication of parents for their children will be answered. Abu Hurayrah narrated that the Prophet said: “There are three supplications that will undoubtedly be answered (by Allaah): The supplication of a victim of injustice, the supplication of a traveler, and the supplication of a parent for his child." [Ibn Maajah]
Also, you should frequently perform Ruqyah on her, as it is beneficial for physical and psychological disorders. For more benefit, please refer to Fataawa 88660 and 82918.
There is no doubt that she needs the care, compassion and affection of her father. You should seek the help of wise and righteous people to advise her father and remind him of Allaah and that he will be asked about his daughter on the Day of Resurrection. Ibn ‘Umar narrated that the Prophet said: “Every one of you is a guardian and is responsible for the people under his guardianship … and a man is a guardian in his house and is responsible for the people under his guardianship…” [Al-Bukhari and Muslim] Abdullaah ibn 'Amr narrated that the Prophet said: “It is sufficient sin for a person to neglect his dependents.” [Ahmad and Abu Daawood]
Finally, we ask Allaah to relieve all your hardships and grief, to make for you a way out of all your difficulties, to heal your daughter, and to guide her father to the right path.
Allaah Knows best.