Psalm 105:27 They shewed his signs among them, and wonders in the land of Ham.
Psalm 106:22 Wondrous works in the land of Ham, and terrible things by the Red sea.
As it turns out, the word translated Egypt in English translations is the same word as Ham's son Mizraim (Genesis 19:6).
I can't imagine why translators would not use the same word in both locations for the benefit of English readers; either "Egypt" or "Mizraim". I would have preferred Mizraim as it seems to have a closer pronunciation to the original.
I have updated the diagram to clarify that Mizraim is Egypt.