The word "him" refers to Necho who represents himself accompanied by his army. AT: "fight with the army of Egypt" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
# that had come from the mouth of God
Here God is represented by his "mouth" to emphasize his speech. AT: "that had come from God" or "that God had said to him" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
# so he went
The word "he" refers to Josiah who represents himself accompanied by his army. AT: "so he and his army went" (See: [[rc://en/ta/man/translate/figs-synecdoche]])