The women were taken to hospital after a flat was set on fire