As suggested in the comments on verse 3 in this chapter, the Book of Mormon had not been written at this point. Nevertheless, Mormon’s readings were gelling as to the things that he would write. Therefore, even though the Nephite end does not yet seem sure (“if they perish”), Mormon still links it to the demise of the Jaredites. That is a theme that he elaborates clearly in his masterwork.
Verse 24 notes that Mormon has records that he wants to give to Moroni. Modern readers will certainly assume that this means the plates containing the Book of Mormon. However, they had not yet been written. Mormon intended originally for Moroni to have custody of all of the records. Eventually, that would not happen. The archive would be buried in Cumorah (Mormon 6:6) and Moroni would be entrusted with the record that was predicted to survive and to come forth, as out of the dust.