The formula for the heat required to raise the temperature of an object is q=mcΔT where the variables are as follows:
q=heat
m=mass
c=specific heat
ΔT= change in heat
You are given mass and specific heat and are told that the final temperature is 87 and the initial temperature is 20 meaning the change is 67 (87-20). Therefore, if plugged into the equation that yields
q=(2)(4186)(67)= 560,924 J