Q = Thermal energy m = mass c = specific heat Δθ = Temperature difference
the hot cup of coffee has a higher temperature. But the mass of coffee is very low compared to the mass of water in swimming pool. The maximum temperature for coffee only can go up to 100 ⁰C since the boiling point of water is 100 ⁰C. But the mass of water in swimming pool is very large and the thermal enegy is very high compared to the coffee cup due to that reason.