It is stated in the Quran that a divorced woman for the first and second time is to have her Eddah as 3 menstruations.
Allah says: ” And divorced women shall wait (as regards their marriage)for three menstrual periods” 2:228
This verse has been specified by another verse that stated that a pregnant woman’s Eddah is when she delivers.
Allah says: “And those of your women as have passed the age of monthly courses, for them the ‘Iddah (prescribed period), if you have doubts (about their periods), is three months; and for those who have no courses (i.e. they are still immature) their ‘Iddah (prescribed period)is three months likewise, except in case of death). And for those who are pregnant (whether they are divorced or their husbands are dead), their ‘Iddah (prescribed period) is until they lay down their burdens; and whosoever fears Allâh and keeps his duty to Him, He will make his matter easy for him.” 65:4
Therefore, immediately after she delivers she has no relations with her ex and she can marry.