Additional consideration:
As Plane B is in the air for longer and working harder against the wind, it will burn more fuel.
On the return journey, the lighter fuel load combined with the tail wind should see Plane B catch up with plane A.
Return journey times end up the same (?)