entropy to be maximised, the temperature of A must equal the temperature of B. So, if we leave this system for long enough that the microstates become completely randomised, then when we come back, we should expect A and B to have equal temperatures.
Temperature and the Sackur–Tetrode Equation