“king of Jericho.” The “kingdom” of the king of Jericho would not have been very large; just the city of Jericho itself and perhaps some small towns in the local area. Nevertheless, the “king” would oversee the city, make judicial decisions, and command a small army of the local men.
“was told.” Even though it was after dark (cp. Josh. 2:5), an important event such as men from Israel entering the city was serious enough to interrupt the king. Good leaders know the importance of good and timely intelligence and encourage their people to get that information to them.
“search.” The Hebrew word is “dig.” The idiom “dig out the land” referred to uncovering what was there. The Hebrew language uses very concrete language. However, the language that the woman spoke would have almost certainly not been Hebrew. It might have been that these two men were chosen because they knew some of the local language.