The Nephites' Way
The Lamanites, still feeling robbed because of their daughters' abduction by the priests of Noah, began to be "stirred up in anger against the Nephites." But having made an accord, they did not slay them. Instead, the Lamanites began to smite and afflict the Nephites.
Mosiah 21:4 reminds us that "all this was done that the word of the Lord might be fulfilled." The people had not truly repented as Abinadi had warned them to do. Now they were suffering the consequences of their actions.
The Nephites became weary of the Lamanites tormenting them and so they asked King Limhi to grant them his will in fighting the Lamanites. King Limhi agreed and three times the Nephites battled the Lamanites but were driven back suffering tremendous losses. After the third attempt, the Nephites found themselves in a corner. They were forced to humble themselves.
The Lord's Way
The Nephites could have given up all hope at this point and perhaps they could have decided to keep fighting the Lamanites and either conquer or be destroyed completely. But they did not. Despite their sinful lives, they remembered the teachings of the prophets and they knew that the Lord would still be merciful unto them. They were not yet "past feeling." (see 1 Nephi 17:45 and Moroni 9:20) So too should we remember the Lord's mercy. We need not worry if the Lord will take us in again. We can always repent and be forgiven.
Elder Holland, in the October 2006 General Conference, eloquently said, "To all of you who think you are lost or without hope, or who think you have done too much that was too wrong for too long, to every one of you who worry that you are stranded somewhere on the wintry plains of life and have wrecked your handcart in the process, this conference calls out Jehovah’s unrelenting refrain, “[My] hand is stretched out still.” (Isaiah 5:25, 9:17, 21) “I shall lengthen out mine arm unto them,” He said, “[and even if they] deny me; nevertheless, I will be merciful unto them, … if they will repent and come unto me; for mine arm is lengthened out all the day long, saith the Lord God of Hosts.” (2 Nephi 28:32)His mercy endureth forever, and His hand is stretched out still. His is the pure love of Christ, the charity that never faileth, that compassion which endures even when all other strength disappears. (Moroni 7:46-47) (Jeffrey R. Holland, “Prophets in the Land Again,” Ensign, Nov 2006, 104–7)
If ever we find ourselves in a bind or in the depths of sin or sorrow or in sore trials, the only plan of action we need to take is to seek the Lord. If we do that, all else that follows will be an answer to our prayers. We must first trust in the Lord. If we venture to solve our problems on our own, we may be successful some of the time, but we will eventually "lie down in sorrow." (see Isaiah 50:11, 2 Nephi 7:11 and especially D&C 133:64-74)
The People of Limhi Escape
In chapter 22, we are bought back to the point in time where Ammon and Limhi begin to plan the escape from the Lamanites.
As discussed before, Gideon offers his services by providing a plan for the king and his people to escape. His plan was to depart via a secret pass. To avoid Lamanite detection, they give the Lamanite guards wine. Once the guards have passed out from the wine, the Nephites escape and are long gone before a Lamanite army is summoned to track them down.
The pursuing Lamanite army follows the Nephites' tracks for two days before becoming lost themselves. This army would later find Amulon and the priests of Noah and eventually find Alma and his people.