Hi Barry,
You should have exported the email folders and save them as mbox files using the ImportExportTools add-on, and use the add-on to import them later.
That menu add-on should have already done export, storing the mbox files in the accounts local directory within the profile.
Whatever you do don’t use the sync command in Offline>Download/Sync as that can delete messages in the downloaded folders.
I would have just moved the contents of the yahoo account to Local Folders since you want to delete your yahoo account and you need to switch to working offline using file -> offline -> work offline to see offline folders.
I would recommend you to import the downloaded folders to Local Folders using ImportExportTools add-on.
But first, you should save the copy of the whole profile. Just to be on the safer side.
That will open a windows explorer at your profile directory so that you know the right directory to backup.
You may try this much and let me know if you face any problem.