Shem is probably Israel; Canaan, of course, the Canaanites; by analogy, Japheth should be some third element of the population of Palestine - the Philistines or 'the Phoenicians have been suggested.
The sense of the second line is doubtful, it may be "let God dwell" or "let Japheth dwell"; on the latter view Japheth appears to be in friendly alliance with Shem.
The words might mean that Japheth was an intruding invader, but this is not consonant with the tone of the oracle.
Possibly Japheth is only present in Gen.
Japheth is the northern and western division of the nations; being perhaps used as a convenient title under which to group the more remote peoples who were not thought of as standing in ethnic or political connexion with Israel or Egypt.