“they were greatly afraid.” The verb is plural, but the sentence starts with the singular person, Adoni-zedek. This is just one of the many examples in the Bible where a leader is representative of all his people.
Adoni-zedek, king of Jerusalem, was likely “greatly afraid” of Gibeon’s covenant alliance with Israel because Gibeon sits on a hilltop, or plateau, about 5 miles north of Jerusalem, and is a good staging ground for an attack on Jerusalem. Adoni-zedek knew that a foreign, antagonistic group on his north was dangerous. But his fear, although logical, was misplaced. He feared the humans to his north, but he was not afraid of Yahweh, even though it was Yahweh that did the great miracles that had been behind the great successes of Israel and the defeat of Israel’s enemies ever since the plagues on Egypt. Christ warned us not to fear the wrong party; he said not to fear humans who can only kill the body, but fear God who can destroy one’s life in Gehenna (Matt. 10:28). In Joshua 10:8 God confirms that it is He who gives the victory.
“the royal cities.” At this time, the larger city-kingdoms.