This puts us back into the narrative Nephi wrote much earlier in his first book. He described this in 1 Nephi 11: 27. Although the Lord's mortal ministry was future, and separated by more than half-a-millennium, Nephi witnessed it. The Lord is able to make witnesses of His mortal ministry even of someone who lived at another time and place, as He has done with Nephi.
During that vision, Nephi saw more than the Lord's mortal ministry. He was shown the entire history of the world through the end of time. However, Nephi was only permitted to bear selective testimony of what he saw. Others were given responsibility for testifying to portions of what Nephi saw, but was not permitted to record. He saw it all. He was to record only some of what he saw. He was told at a certain point that the responsibility for recording it became John the Beloved's and not Nephi's. (See 1 Nephi 14: 19-28.) Nephi saw it, John the Beloved saw it, and others, including Isaiah, also saw it. (1 Nephi 14: 26). I've explained this in Nephi's Isaiah.
Here Nephi returns to the Lord's baptism to begin an explanation of "the doctrine of Christ" ( 2 Nephi 31: 2) so that Nephi's testimony refocuses the reader on the path required for salvation. Since Nephi's primary reason for writing is to save others, he cannot finish without a final direct appeal for all to understand the "doctrine of Christ."
What is the difference between "the doctrine of Christ" and the "Gospel of Jesus Christ?" How do they relate to one another?
Here Nephi has linked together four distinct thoughts: First he has 1) already described the prophet which 2) the Lord had shown to Nephi. This was the earlier vision described above. That prophet 3) should baptize the Lamb of God during the Lord's mortal ministry. The Lord, who is the Lamb of God 4) should take away the sins of the world.
This is a specific time and setting. It involves a specific event and two persons: John the Baptist and Jesus Christ. Nephi has seen the event, and reminds us of it as a baseline from which to reconstruct the "doctrine of Christ."
Remember that the Jews who confronted John the Baptist did not ask him what ordinance he was performing. They did not ask why he was performing the ordinance. They only asked what authority permitted him to be performing an ordinance which they already understood and undoubtedly already practiced. Why would John baptize if he were not Christ, or Elias (in that context meaning Elijah), or another returning prophet who already had the authority. ( John 1: 19-28.) The inquisitors already understood the ordinance.
Baptism was a pre-Christian ordinance. Because of historic interests which conflict with one another, both the Jews and the Christians downplay or ignore that truth.
Look at the wording above and ask yourself: Why, when the vision is shown to Nephi, is Christ identified as "the Lord?" Then, when Nephi beholds His baptism, why does he refer to Christ as "the Lamb of God?" The same person, at first identified as "the Lord," and then identified as "the Lamb of God." Why these two identities? Why would it be so clear to Nephi that the Lord holds these two identities that he would use them in this single verse to make Christ's identity and deeds clear to the reader? How do the different names/titles help us to better understand Christ?
Why is a pre-Christian prophet commissioned to know and write about these things? Why would the Nephite descendants from the time of this writing through the time of Moroni all be entitled to know about this event? What importance is it for us to understand this about Christ?
Well, let's push further into the "doctrine of Christ" to see what it may persuade us to do or believe.