Energy or heat can be calculated in terms of the mass, temperature, and specific heat of a substance. This is given by the equation:
U = mCpΔT = mCp(Tf-Ti)
where:
m = mass
Cp = specific heat
ΔT = temperature difference
For this problem, you need to get the specific heat of granite which can be found in reliable chemistry/engineering books or websites. According to Engineering Toolbox website, the Cp of granite is 790 J/(kg-°C).
U = 17 kg (790 J/(kg-°C)) (21-45) = - 322,320 Joules
*Note: the sign is negative because energy was released