In a system, heat that is gained and lost should be conserved. We calculate as follows:
Heat from phase change + sensible heat from the change in tempeture of the ice = sensible heat from the change in temperature of water
mH(fusion) + mCpΔT = mCpΔT
.05 (335) + .050(4.184)( T - 0) = .4 (4.184)(45 - T)
T = 34.8 °C