It's true that the Earth is spinning, but this does not change the result.
In what we on the ground would experience as still air conditions, the air is spinning at the same speed as the Earth. If it were not, we would have a wind speed of about 1000 knots at the Equator. This would drastically rearrange most of the rain forrests and the monkeys would need much stronger grips!
The question specifies that both aircraft are flying at the same TAS. This means that they have the same speed relative to the atmosphere (which as we have observed is spinning at the same speed as the Earth).
So the fact that the Earth is spinning does not change the ground distance flown.