I have a glass of water at room temperature and hot mug of coffee, both kept inside a closed room. As the coffee cools down, what happens to the temperature of the glass of water? ( Room is perfectly insulated from outside)
The water gets warmer
Let us assume the room is perfectly closed and no heat is being gained from or lost to the environment outside.
Here we have not two but three bodies, thermally interacting inside the room - the glass of water (initially at room temperature of 230C), the air in the room, and the hot mug of coffee.
As the coffee cools down, it slightly increases the hotness of the air in the room. Thus, the room temperature itself increases after some time (say, to ~240C); this means the glass of water is now cooler (~10C) than the air around it. Due to this temperature difference, the water will get slightly warmer until it reach thermal equilibrium with the air.