Both planes take-off from the ground. The ground is moving at the speed the earth is rotating. Both planes are moving the same speed as the ground when they takeoff, so they are both essntially moving at the same speed the earth is rotating. When they takeoff, they continue to have the speed the earth is rotating due to inertia, the only difference in velocity is their velocity relative to the ground. These have the same magnitude, just opposite directions.
Since they are both travelling relative to the ground, they both have the same magnitude of velocity relative to the ground, just opposite directions, so it will take them both the same time to make the trip.
Let me know if this helps.
Engineer
Jack of all trades