The amount of heat lost by granite is equal to the amount of heat gained by water. Therefore their change in enthalpies must be equal. The opposite in sign means that one is gaining while the other is losing
ΔH granite = - ΔH water
ΔH is the change in enthalpy experienced by a closed object as it undergoes change in energy. This is expressed mathematically as,
ΔH = m Cp (T2 – T1)
Given this information, we can say that:
12.5 g * 0.790 J / g ˚C * (T2 – 82 ˚C) = - 25.0 g * 4.18 J / g ˚C * (T2 – 22 ˚C)
9.875 (T2 – 82) = 104.5 (22 – T2)
9.875 T2 – 809.75 = 2299 – 104.5 T2
114.375 T2 = 3108.75
T2 = 27.18 ˚C
The temperature of 2 objects after reaching thermal equilibrium is 27.18 ˚C.