I learned from another Book of Mormon commentator that this chapter is divided into two parts. The first part (verses 1-16) pertains to Zion or the New Jerusalem. The second part (verses 17-23) pertains to the Old Jerusalem.
The Earth Shall Wax Like an Old Garment
Verse 6 talks about the Earth dying. The following quote by Joseph Fielding Smith provides more detail on this subject.
To summarize, the Earth is in a telestial state right now. Soon it will transform into a terestial state (a renewed earth in its paradisiacal glory). Finally the Earth will change to its final state which will be celestial.
This earth is filling the measure of its creation. (D&C 88:18-26.) Today
it is passing through its mortal state. The time will come when it shall die and
pass away as do all things upon it. Isaiah says: ‘The earth mourneth and fadeth away, the world languisheth and fadeth away, the haughty people of the earth do languish.’(Isaiah
“’The earth is utterly broken down, the earth is clean dissolved, the earth is moved exceedingly. The earth shall reel to and fro like a drunkard, and shall be removed like a cottage; and the transgression thereof shall be heavy upon it; and it shall fall, and not rise again.’ (Isaiah 24: 19-20) Again he declares: ‘Lift up your eyes to the heavens and look upon the earth beneath; for the heavens (i.e. the heavens surrounding the earth) shall vanish away like smoke, and the earth shall wax old like a garment, and they that dwell, therein shall die in like manner.’ (Isaiah 51:6.) Here we have predictions that the earth shall pass away, die, and all its inhabitants shall also die in like manner. This truth was not generally and correctly understood until the Lord made known in revelations to Joseph Smith that this should be the case. When Isaiah said the earth should ‘fall and not rise again,’ the interpretation is that it should not be restored to the same mortal or temporal condition. When the earth passes away and is dissolved it will pass through a similar condition which the human body does in death….The ‘new heavens and new earth’ referred to in this scripture [Isaiah 65:17], and also in D&C 101:23-31, had reference to the change which shall come to the earth and all upon it, at the beginning of the Millennial reign, as we declare in the tenth article of the Articles of Faith. This is the renewed earth when it shall receive its paradisiacal glory, or be restored as it was before the fall of man. (See Compendium, art, "Millennial Reign," p. 202.) ‘The new heaven and new earth’ we are discussing in D&C 29, is the final change, or resurrection, of the earth, after the ‘little season’ which shall follow the Millennium.” (Church History and Modern Revelation, vol. 1, p. 132)
The People in whose Heart I Have Written My Law
Verse 7 refers to having the Lord's law written on our hearts. Obviously this is symbolic. So what does it mean? To me, having the Lord's law written on our hearts means that we no longer have to think about obeying the commandments. Instead, we simply live it … it is a part of our lives. Sometimes we have to force ourselves to obey a commandment. If we are not in the habit of praying every morning and night, then we have to remind ourselves to pray morning and night. Soon our prayers become habit and we automatically say our prayers when it is time to pray. I also tend to think that when we memorize scripture and thoroughly study it, we have the Lord's law written on our hearts.
Thy Sons Have Fainted
Verses 18 and 19 refer to the two prophets who preach in Jerusalem for three and a half years and then are killed and their bodies lay in the streets for three days. Revelation 11:2-12 expands on this prophecy.
2 But the court which is without the temple leave out, and measure it not; for it is given unto the Gentiles: and the holy city shall they tread under foot forty and two months.
3 And I will give power unto my two witnesses, and they shall prophesy a thousand two hundred and threescore days, clothed in sackcloth.
4 These are the two olive trees, and the two candlesticks standing before the God of the earth.
5 And if any man will hurt them, fire proceedeth out of their mouth, and devoureth their enemies: and if any man will hurt them, he must in this manner be killed.
6 These have power to shut heaven, that it rain not in the days of their prophecy: and have power over waters to turn them to blood, and to smite the earth with all plagues, as often as they will.
7 And when they shall have finished their testimony, the beast that ascendeth out of the bottomless pit shall make war against them, and shall overcome them, and kill them.
8 And their dead bodies shall lie in the street of the great city, which spiritually is called Sodom and Egypt, where also our Lord was crucified.
9 And they of the people and kindreds and tongues and nations shall see their dead bodies three days and an half, and shall not suffer their dead bodies to be put in graves.
10 And they that dwell upon the earth shall rejoice over them, and make merry, and shall send gifts one to another; because these two prophets tormented them that dwelt on the earth.
11 And after three days and an half the Spirit of life from God entered into them, and they stood upon their feet; and great fear fell upon them which saw them.
12 And they heard a great voice from heaven saying unto them, Come up hither. And they ascended up to heaven in a cloud; and their enemies beheld them.