Here "Amalek" is a metonym that refers to the people of Amalek. This continues Balaam's vision while turning to look in the direction of the Amalek nation, and then he prophecies about the Amalekites. (See: [[rc://en/ta/man/translate/figs-metonymy]])