“Joshua sent men from Jericho to Ai.” Joshua and the Israelites were camped at Gilgal, near Jericho (Josh. 5:10). They would not have camped in the ruined city of Jericho because it was cursed (Josh. 6:26) and because having just been burned with fire it would not have been habitable. But the large and strongly fortified city of Jericho controlled the whole area, so it is called “Jericho” here, especially since Gilgal was not a city, it was simply the place where Israel was camped.
“east of Bethel.” Bethel was an eventual target, and no doubt highly desired because of its association with Abraham and Jacob (e.g. Gen. 12:8).
“Go up.” This is literal. In making the simple statement that “Joshua sent men from Jericho to Ai,” we must understand that Jericho was about 900 feet (c. 275 meters) below sea level while Ai was about 2,500 feet (c. 750 meters) above it, so the men made an uphill march of some 3,500 feet (c. 1000 meters).
“and spy out the land.” Compare this to Numbers 13:17, when Moses told men to go and spy out the land. In that case, the men came back and said that the people of the land were too many and too strong to conquer. This time the spies come back and say that not all the men of Israel are required to conquer Ai, and they would not have been except for Achan’s sin.
“the land.” In this context, the city and the area around it.