There are a couple of items that are assumed here. Ammon is working by power. And now King Lamoni is recognizing that power: the power to discern the thoughts of his heart, the power to slay the enemies of the king. Lamoni tells Ammon that if he will explain to him how he has this power, that he would in turn give him up to half of his kingdom. This power that Lamoni recognizes, he sees as extremely valuable.
In verse 20, King Lamoni demands, "tell me by what power ye slew and smote off the arms of my brethren that scattered my flocks." The king goes on in the following verse to explain that he would give armed guard to protect Ammon, but that he recognized Ammon as more powerful than his armies, "But I know that thou art more powerful than all they;" (vs. 21).
Now to put what follows into proper context, I have been brought to consider a talk by Elder Jeffery R. Holland given as instruction to new mission presidents regarding the importance of teaching and understanding the nature of the Godhead: Knowing the Godhead. In his remarks, Elder Holland observes that to "truly find salvation for [our] souls, it will have to begin with some knowledge and understanding of the members of the Godhead."
After reading the whole of his written remarks on topic, I went back to this account in the book of Alma. Ammon seemed to understand the preeminent importance of this priority, that without the foundation of having a correct knowledge of who God the Father, His Son Jesus Christ, and the Holy Ghost are, nothing else would really matter. With this focus then, Ammon's is placed in a perfect position to respond to the kings inquiries about his power by testifying of God .
Now Ammon being wise, yet harmless, he said unto Lamoni: Wilt thou hearken unto my words, if I tell thee by what power I do these things? And this is the thing that I desire of thee.
And the king answered him, and said: Yea, I will believe all thy words. And thus he was caught with guile.(vs. 22-23)The very first thing that Ammon then does, having gained the full attention of the King, is to teach him who God is and to establish His nature and characteristics. Ammon builds on the king's knowledge of a Great Spirit and equates that with God. (see vs. 24-28) He explains that God is the Creator of heaven and earth. He teaches that from heaven, God is omniscient and all-knowing into the affairs of man. (see vs. 28-32) He doesn't go into great detail about God's character, only enough to establish Him as God, "This is God." (vs. 28)
The king believes Ammon's words and says so, "I believe all these things which thou hast spoken," but then appears to still be very interested in learning by what power he was able to do the works that he had accomplished, and so he asks, "Art thou sent from God?" (vs. 33)
Ammon answers the king's question, deflecting personal adulation, while still teaching about the nature of God, and making perhaps the most important connection in illustrating man's relationship to God, "I am man, and man in the beginning was created after the image of God." In other words, God and man look the same. Man was designed to look like, act like, and be like God.
Ammon then continues by teaching about the Holy Spirit, stating that his call came by that Holy Spirit to teach the people, that they might know that which is just and true. And then finally, the answer to the king's question: "And a portion of that Spirit dwelleth in me, which giveth me knowledge, and also power according to my faith and desires which are in God." (vs. 35)
Elder Holland said this:
Our [investigators] need to know that the Holy Ghost is the member of the Godhead with whom they will have their most frequent and most intimate relationship as they receive the missionaries and pray for heavenly guidance regarding their message. It is this member of the Godhead who will lead investigators to truth and will then bear witness of that truth when they encounter it. The investigators must be taught to recognize the Spirit when it manifests itself during the course of the lessons. (ibid)As Ammon continues to teach, he then recounts a spiritual history of the world from the time of Adam down to the present time, teaching specifically about Lehi, Nephi, and Laman and Lemuel's rebellion. When I read this I think how bold of Ammon to teach Lamanites about the rebellion of Laman and Lemuel. It almost seems to hold the same position as teaching about Joseph Smith in our days. To teach the Lamanites about the rebellion of Laman and Lemuel is also to teach that Nephi was a prophet, who had the word of God from which Laman and Lamuel rebelled.
Then finally in verse 39, Ammon teaches about the plan of redemption and the central role of Jesus Christ. IT seems to be the capstone that everything else points to, and which without, nothing else has purpose or meaning. Ammon does, in fact, teach about all three members of the Godhead, and the immediate effect upon King Lamoni, who had already believed that Ammon would tell him the truth from the outset, is profound.
Immediately the king prays, not only for himself, but also for his people: "O Lord, have mercy; according to thy abundant mercy which thou hast had upon the people of Nephi, have upon me, and my people," (vs. 41).