The major difference in 3 Nephi 12:21 from Matthew 5:21 is the addition of “and it is also written before you.” There will be other times when the New World Sermon appears to emphasize a written word where the Old World Sermon spoke mostly to the oral law.
In 3 Nephi 12:22, the phrase “without a cause” in Matthew, is left out. That is a disputed clause, and might not have been part of the original sermon. The effect is to point out the danger of anger rather than the action of murder.
In the Book of Mormon, verse 22 also introduces a number of doctrinal amplifications, where a condition is set, and then there is an elaboration or alteration of that condition. In this case, the statement comes with the declaration of a known law: “[T]hou shalt not kill” (referenced in verse 21). While that phrase is well known in English, the intent is much more to be “thou shalt not murder.” Jesus does not remove that law. He said he wouldn’t, and he doesn’t.
He does, however, provide a form of fulfillment for the law by amplifying it. Not only should one not murder, they should not become so angry that they would contemplate murder. It is unlikely that Jesus thought that humankind could ever rid ourselves of all anger. The problem that is presented is intended to fit into the context of murder. One can only murder another if the other person dies. However, attempted murder differs only in the result for the victim. For the perpetrator’s soul, the damage is the same.
Since Jesus is encouraging individual righteousness, that personal righteousness requires that we no longer anger so much that we even wish we might murder. The eternal consequences for us might be the same, regardless of the effect on the possible victim.