Women, at first --> 30% x 40 000 = 12 000
Children, at first --> 10% x 40 000 = 4 000
Men, at first --> 40 000 - (12 000 + 4 000)
= 40 000 - 16 000
= 24 000
Half the children left,
Children remaining --> 4 000 / 2 = 2 000
Men didn't leave, hence:
New 75% --> 24 000
New 100% --> 24 000 x 100 / 75 = 32 000
Women, at the end --> 32 000 - (24 000 + 2 000)
= 32 000 - 26 000
= 6 000