Two substances A and B, initially at different temperatures, are thermally isolated from their surroundings and allowed to come into thermal contact. The mass of substance B is twice the mass of substance A, but the specific heat capacity of substance A is four times the specific heat capacity of substance B.