You are correct! Both the temperature change and the grams are multiplied times the specific heat of water to solve this problem.