Heat lost by the hot body is equal to the heat gained by the cold body, i.e., Heat lost = Heat gained.