Here we want to use q=mCΔT, where q is the heat in joules, m is mass, C is the specific heat constant, and ΔT is the change in temperature. We know that we want to decrease the temperature from 62.9 C to 6.7 C, which means we want to lose 56.2 C. The specific heat of water is something that most teachers expect students to memorize so you may want to ask about that but it is 4.18 J/g*C. Lastly, we are given the mass of 25 g so now we can plug these all in the formula from earlier.
q= (25.0g ) (4.18 J/g*C) (-56.2 C)
q= - 5,872.9 J
Keeping in mind sig figs, we should have 5870 J of heat lost