What will be the final temperature of 130 g of 20°C water when 100 g of 35°C iron nails are submerged in it? (The specific heat of iron is 0.12 cal/(g·°C).)

the sum of heats gained is zero.

heat gained by water+heat gained by iron=0
130*cw*(Tf-130)+100*ci*(Tf-35)=0
solve for Tf