Here "the sword" represents war. The Israelites experiencing war even if they go to Egypt is spoken of as if the sword would chase after the people catch up with them. Alternate translation: "you will experience the terrible results of war" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-personification]])
The Israelites experiencing famine even in Egypt is spoken of as if famine would chase after them. Alternate translation: "You worry about famine in Israel but if you go to Egypt you will suffer from famine there" (See: [[rc://en/ta/man/translate/figs-personification]])