What will happen when substance A is dropped into substance B?

a
Substance A and B will exchange heat, and they both will reach 50°C.
b
Substance A and B will exchange heat, and they both will reach 25°C.
c
Substance A will get even warmer as heat flows into it from substance B.
d
Substance A and B will eventually reach the same temperature.

d

Substance A and B will eventually reach the same temperature.