Specific heat of a metal is the amount of energy required to heat one gram of the metal by 1 degree celsius.
Heat energy = (mass of substance)(specific heat)(change in temperature)
Mass of substance = 50 g
Heat energy =31 Joules
Change in temperature = 25 degree celsius.
Hence, specific heat = (31)/(50*25) = 0.0248 J/g deg Celsius