The Greeks are stranded in a hostile land, their leadership heavily destroyed. They have no obvious way of getting home. They have no market, and thus no easy way even to feed themselves. They spend a night in grief. They seem doomed.
But Xenophon will step up and pull them together. Books I and II are, in a sense, just prologue. It is only in Book III that we learn how Xenophon even happened to be with the Ten Thousand at all:
There was a man in the army named Xenophon, an Athenian, who was neither general nor captain nor private, but had accompanied the expedition because Proxenus, an old friend of his, had sent him at his home an invitation to go with him; Proxenus had also promised him that, if he would go, he would make him a friend of Cyrus, whom he himself regarded, so he said, as worth more to him than was his native state.
Having received this invitation, Xenophon visits Socrates and asks for his advice. Socrates points out that if Xenophon becomes a friend of Cyrus, who is very pro-Sparta, the Athenian government might see that as a betrayal. Thus he advised Xenophon to go to Delphi and ask the Oracle about this endeavor.
So Xenophon went and asked Apollo to what one of the gods he should sacrifice and pray in order best and most successfully to perform the journey which he had in mind and, after meeting with good fortune, to return home in safety; and Apollo in his response told him to what gods he must sacrifice. When Xenophon came back from Delphi, he reported the oracle to Socrates; and upon hearing about it Socrates found fault with him because he did not first put the question whether it were better for him to go or stay, but decided for himself that he was to go and then asked the god as to the best way of going. “However,” he added, “since you did put the question in that way, you must do all that the god directed.”
Thus Xenophon did his sacrifices and joined the expedition -- late, as it happens, because he only caught up to it in Sardis as it was just starting out. Proxenus was glad to see him, and Cyrus himself promised that Xenophon would be sent home right after the expedition. This was still the point at which Cyrus was deceiving his troops into thinking he was only building an army against local enemies, and Xenophon was deceived just like everyone else.
Xenophon ended up being as depressed by the final turn of events as everyone else, but that night he had a dream in which there was a great thunderclap and lightning set his father's house on fire. He didn't know whether it was auspicious or not, but he realized that the immense problem they were facing could not possibly solve itself, and waiting around for it to do so would be a quick way to die. So he called together the officers who had been serving under Proxenus -- as a friend of Proxenus they were, of course, the commanders he would know. He urged them to take the initiative and be courageous, for the Greeks were better soldiers and, unlike the Persians, has shown themselves honest before the gods, who would likely be on their side. As a result, the officers ask him to take over leadership, despite his youth.
All of Proxenus's officers then went around to the other sections of the Greek army to see which of the leadership had survived from each group, even if it was only a lowly captain, and called them all to a meeting. All together there were about a hundred. When they were gathered, Xenophon laid out his plan. First, they needed to replace their leadership as soon as possible, and, second, the new commanders needed to rally the troops, who were in a state of understandable depression. The surviving commanders agree, and new commanders are chosen, with Xenophon taking the place of Proxenus. They gather the troops and the commanders speak to them. Finally Xenophon arises, in his full battle armor (3.7-8):
Hereupon Xenophon arose, arrayed for war in his finest dress. For he thought that if the gods should grant victory, the finest raiment was suited to victory; and if it should be his fate to die, it was proper, he thought, that inasmuch as he had accounted his office worthy of the most beautiful attire, in this attire he should meet his death. He began his speech as follows: “The perjury and faithlessness of the barbarians has been spoken of by Cleanor and is understood, I imagine, by the rest of you. If, then, it is our desire to be again on terms of friendship with them, we must needs feel great despondency when we see the fate of our generals, who trustingly put themselves in their hands; but if our intention is to rely upon our arms, and not only to inflict punishment upon them for their past deeds, but henceforth to wage implacable war with them, we have—the gods willing—many fair hopes of deliverance.”
At the very moment Xenophon said the word 'deliverance' (soterias) someone sneezed -- a common omen in ancient Greece. So Xenophon proposes that they sacrifice to the gods, especially Zeus Soter, and asks the soldiers to raise their hands if they agree, which they do. After the sacrifices, Xenophon finishes his speech by reminding the Greeks of the great things that Greeks had accomplished in battle over the generations, as well as their recent successes against Persian foes. He then addresses a matter of significant concern for the army -- they are all infantry, with no cavalry to assist, while the Persians were well equipped in that area; and he points out that, whatever advantages a cavalry may provide, it is the infantry who actually do the work -- armies are not defeated by the biting and kicking of horses. The primary advantage the Persian cavalry will have is being able to flee faster. As for another major concern -- the lack of a market -- Xenophon notes that they can simply appropriate what they need now -- no longer are they confined to "small measures for large prices". He suggests that they hide the fact that they intend to return home, to throw the Persian King back on what he would do if the Greeks decided to stay, and that they burn their tents and wagons and do everything else they can to travel more lightly. And, finally, he proposes that soldiers who do not obey orders should be disciplined not merely by the commanders but by everyone. But he says if anyone has a better plan, he should bring it, "for the safety of all is the need of all." When the soldiers agree to his proposals, he further proposes that they march in hollow square formation, the better to protect in the center what supplies they do need to carry, and they agree by raising their hands again.
The next day the Greeks began to put Xenophon's plan into effect, but it was a brutal day for them, as they were continually harried by the Persians and could only proceed very slowly. In response, Xenophon tries to organize a pursuit, but fails to catch a single attacker, because they have no horses. The experienced generals found fault with him for this, and Xenophon agrees with them, but notes that it shows that they need horsemen and distance weapons. There are Rhodians in the Greek army, and Rhodians are famed for their skill with the sling -- if they could be supplied, they could outsling the Persian slingers. They also have some scattered horses (including some of Xenophon's own), and if they could equip even a small cavalry, they could do more damage. The generals agree, and so it goes. The result was about fifty horsemen and two hundred slingers.
The next day, the Persians show up with a large army backed by a thousand horsemen and four thousand archers and slingers. But the Greeks are able to repulse this force, and to march onward. Eventually Tissaphernes himself shows up with a massive army pulled together from all the sources available to him. But the Rhodian slingers, deadly accurate and capable of a longer range than the Persian slingers, keep them at bay. The Cretans, meanwhile, were able to supply their small but effective archery corps with the spent arrows of the Persians. Raids on villages supply the slingers with lead for bullets. So it went for a while. The Greeks, meanwhile, discovered that the hollow square is not a good formation when you are being pursued -- it is too difficult to keep regular over inconsistent terrain. So they adapted their formation to their needs, by organizing into companies that could pull forward or fall back as needed.
We get an interesting view of how authority works in the Greek army from a situation in which they discover that the Persians are occupying the spur of a mountain near which they need to pass. Cheirisophus, the most experienced remaining general, and a Spartan, summons Xenophon, telling him to bring his peltasts, or light infantry, to the front. Xenophon, however, can see that Tissaphernes is coming up with an army behind, so he leaves the peltasts and goes himself. They inform each other of the problems, and Xenophon proposes a charge to the mountaintop -- the Persians may have the immediate high ground, but if the Greeks can quickly take the higher ground above them, the Persians on the mountain will not be able to maintain their position. They come to an agreement that Xenophon will lead the charge. Unfortunately, the Persians realize what is happening almost at once, and it becomes a race to the top -- which the Greeks win, due to Xenophon's quick handling of discontent over the hard, fast slog.
After some puzzlement over the best route to follow, they eventually decide to march north to the lands of the Carduchians -- a warrior people independent of Persia -- rather than directly west toward Ionia. This would let them get to Armenia, where travel should be easier due to fewer mountains and rivers. And so they set out.
* It's noteworthy that Socrates' warning to Xenophon that joining the expedition could be grounds for an accusation against him seems to have come to pass. While we don't know the details, Xenophon on his return will be exiled from Athens. The immediate accusation was probably his service under Agesilaus of Sparta, but (1) this service is arguably a result of his having gone on the expedition; and (2) his association with Cyrus may have indeed been a contributing reason for his banishment.