My first nifas habit is 40 days . Now with my 2nd child i stopped bleeding at 6th day , now since last 3days it is clear so do i have take ghusl and pray or i have to wait for 40 days in case bleeding occurs again.
In the name of Allah, the Inspirer of truth,
40 days is the maximum possible duration of post-natal bleeding (nifas). Whenever bleeding stops within 40 days after childbirth, you must take a ritual bath (ghusl) and resume praying.
However, if you see blood again within these 40 days, you will again abandon prayer. The clear days in-between these blood will retrospectively be known to be part of nifas.
The bleeding you have seen from the 03/08 till the 09/08 is all nifas and you should have performed ghusl and started praying salat when this bleeding stopped. If you do see blood again before 12/09 at 10:oo, it will all be nifas, even though bleeding was intermittent.
And Allah knows best.