Walking represents behavior and actions. Alternate translation: "King Ahaz acted the same way that the kings of Israel had acted" or "he did the things that the kings of Israel had done" (See: [[rc://en/ta/man/jit/figs-metaphor]])
Here "following" represents doing what others do. Alternate translation: "copying the disgusting things that the other nations did, the nations" (See: [[rc://en/ta/man/jit/figs-metaphor]])
The word "nations" represents the people of other nations. Here it refers to the people of the nations who had lived in that land. Alternate translation: "the people of other nations" (See: [[rc://en/ta/man/jit/figs-metonymy]])
The people of those nations fled as the people of Israel moved into the land. The full meaning of this statement can be made explicit. Alternate translation: "before the people of Israel who moved into the land" or "as the people of Israel moved into the land" (See: [[rc://en/ta/man/jit/figs-explicit]])