Chapter 22 is a thematic continuation of the text of chapter 21, and the two should be read as a continuing unit (as was done in the 1830 edition of the Book of Mormon). This verse does not begin a new subject, but depends directly upon the Millennial text of the previous chapter.
Scriptural: In the context of the triumphal Millennial reign of the Messiah, the personified house of Israel speaks to the Lord. The house of Israel will acknowledge the justice of the Lord, the righteous anger of the past, and give thanks for her miraculous gathering and protection in that last day. In that last day, she will finally give to the Lord that credit and worship which she should have given all along.
Literary: The section marked as a separate chapter here is the song of praise of the united Israel to the Lord. The speaker is the personified Israel, ad the particular speeches are the songs of praise (verses 1-3 and 4-6).