When we follow the promptings of the Holy Ghost, we have the Lord's help to accomplish whatever we have been prompted to do. Ammon was directed to go and rescue his brothers and their friends from prison in Middoni, and he did it.
When Lamoni asked him how he knew that his brethren were in prison in Middoni, Ammon told him the following:
5 And Ammon said unto him: No one hath told me, save it be God; and he said unto me—Go and deliver thy brethren, for they are in prison in the land of Middoni.
"Spirituality yields two fruits. The first is inspiration to know what to do. The second is power, or the capacity to do it." Richard G. Scott, “To Acquire Spiritual Guidance,” Ensign, Nov 2009, 6–9