I believe there should be a way to simply just click on the company you want to transfer the firms out of, and just select which firms to take out and then in which company they are going.
I edited a simple way to achieve this in the images below (I used paint, don't bash me for the poor editing

ADDITIONAL NOTE: While we're at it, why are software and internet companies still not able to be transferred from one company to the other without merging?