You can use Import.xfinity.com to transfer emails and contacts to another account.

There is a background-color that is important.

I have two accounts with the same company.I have several email accounts that were created with one of them.I would like to close that account and transfer those email addresses to another account.How can this be done?

You don't have to transfer anything if you say you have secondary accounts from one service address.They will continue to function if you keep using them and siging in.See here.