Transferring files between two Apple ID accounts
I guess each Apple ID has a dedicated iCloud account.  Login and logout with each individual Apple ID from your MAC and use terminal to access all the documents belong to each Apple ID that are stored in the iCloud . After you access the iCloud account you can move files from the iCloud account to your personal Desktop or anywhere you want.

Try the following Terminal commands:

cd ~/Library/Mobile\ Documents/com~apple~CloudDocs
mv fileName.ext folderName