Here "Egypt" is a metonym for the people of Egypt, and "gather" is a metaphor for causing them to return to Egypt. AT: "I will cause the people of Egypt to return to Egypt" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-metaphor]])
# among whom they were scattered
This can be translated in active form. AT: "among whom I scattered them" (See: [[rc://en/ta/man/translate/figs-activepassive]])