But remember that I defined temperature to be the reciprocal of this derivative, so in order for the 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,
Temperature and the Sackur–Tetrode Equation