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:
In response to your question, we say, and with Allah Almighty lies all success:
The majority of scholars are of the opinion that the length of nifas (postnatal bleeding) is forty days. They based their opinion on the hadith of Umm Salamah in Musnad Ahmad and the Sunan, that at the time of the Prophet (peace be upon him), women in postnatal bleeding used to wait for forty days. But this hadith has a weak chain of narrators.
As for if it was more than forty days – even if the majority of scholars relied upon the aforementioned hadith – a group of scholars are of the opinion that nifas is blood that comes immediately after childbirth. So as long as there is bleeding, the ruling of nifas remains applicable until the bleeding stops. And the longest time period for nifas, according to the statements of scholars, is that it may continue for seventy days. Although according to the madh'hab of Shafi`i (may Allah have mercy on him), it may extend to sixty days, and this is also the opinion of Shaykh al-Islam Ibn Taymiyyah (may Allah have mercy on him).
So from what is apparent, if it reaches sixty days and the bleeding has still not stopped, then she should make ghusl (bath to purify from menses) and start praying. But if the bleeding has stopped, and yellow, cloudy, or other discharges continue, other than blood, then I am of the opinion that if the bleeding has stopped then she should make ghusl and start praying if the forty days have passed.
And if she has nothing but yellowish, cloudy discharge, and the bleeding has stopped, then she should make ghusl and pray. As for the one who continues to bleed in a continuous flow, without a difference in the type or amount of blood, then she remains in nifas up to sixty days. And the one whose bleeding has stopped but continues to have other discharges, then if the forty days have passed, she should then make ghusl and start praying.
And Allah knows best.