Passage
`And Balak son of Zippor, king of Moab, riseth and fighteth against Israel, and sendeth and calleth for Balaam son of Beor, to revile you,
`And Balak son of Zippor, king of Moab, riseth and fighteth against Israel, and sendeth and calleth for Balaam son of Beor, to revile you,
Joshua 24:7 and they cry unto Jehovah, and He setteth thick darkness between you and the Egyptians, and bringeth on them the sea, and covereth them, and your eyes see that which I have done in Egypt; and ye dwell in a wilderness many days.
Joshua 24:8 `And I bring you in unto the land of the Amorite who is dwelling beyond the Jordan, and they fight with you, and I give them into your hand, and ye possess their land, and I destroy them out of your presence.
Joshua 24:9 `And Balak son of Zippor, king of Moab, riseth and fighteth against Israel, and sendeth and calleth for Balaam son of Beor, to revile you,
Joshua 24:10 and I have not been willing to hearken to Balaam, and he doth greatly bless you, and I deliver you out of his hand.
Joshua 24:11 `And ye pass over the Jordan, and come in unto Jericho, and fight against you do the possessors of Jericho--the Amorite, and the Perizzite, and the Canaanite, and the Hittite, and the Girgashite, the Hivite, and the Jebusite--and I give them into your hand.
The verse centers on "balak", "zippor", "king", "moab", "riseth", "fighteth", "against", and "israel". It is saying that the verse draws attention to "balak" and "zippor", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 8's "And I bring you in unto the..." into verse 10's "and I have not been willing to...", so "balak" and "zippor" belong inside that flow. In Joshua context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "balak" and "zippor" with trust shaped by these words, not by a vague optimism outside the passage.