Not sure how you have entered these to start but money movement between unrelated entities (Company A to/from Company B) are of the following types
1. loans
2. equity
3. sales
The rules for 2 above would entail equity out to an owner of Company A and equity in from an owner of Company B
Transfers, while simple and straightforward, should be reserved for bank accounts at same bank but owned only by the same company. Instead record as a check or deposit depending on which way the money flows so that you can affect the correct equity accounts