How to make accounting entries when you exchange dollars with another company?

It's the same as changing money at the bank.

Debit: Bank deposit-RMB (actual exchange amount)

Loan: Bank deposit-USD (according to the book value of USD in RMB)

Financial expenses (debited or credited according to the original book value of RMB dollars minus the actual RMB amount).