You shouldn’t wait for 40 days to do qhusl and pray and fast. What requires is that you are pure. If your bleeding stops and you are pure after 15 or 20 or whatever date then you take ghusl and start doing everything what a woman not in her menses does.