The correct response is:
Thermal energy is transferred from the warmer substance to the cooler substance.
This is the principle of heat transfer, where heat (or thermal energy) flows from an area of higher temperature to an area of lower temperature until thermal equilibrium is reached.