It's no different to a multiple unit set with multiple power cars, or even a Western Region Hydraulic with two engines, which drove the two bogies independently. They never match perfectly, but each just contributes power to the whole formation, with little differences in how the couplers are in tension or compression.
Interesting article in the USA Trains magazine by a mechanical engineer. The US loco multiple unit control system is highly standardised, with groups of locos from different builders, ages and powers all able to be run together from the front cab. It showed some combinations, such as adding a 1200hp switcher to the consist, would have no impact on speed at all, but if placed at the back it did. And so on. Increasingly nowadays in the US instead of huge loco combinations at the front (four was common, I have seen up to eight), the locos are distributed along the train, controlled remotely by radio from the front.