Two heat transfers are involved.
#"heat lost by Al + heat gained by water = 0"#
#q_1 + q_2 = 0#
#m_1c_1ΔT_1 + m_2c_2ΔT_2 = 0#
#m_1 = "3.90 g"#
#c_1 = "0.900 J°C"^"-1""g"^"-1"#
#ΔT_1 = T_f - "99.3 °C"#
#m_2 = 1.0 color(red)(cancel(color(black)("cm"^3))) × "1.00 g"/(1.0 color(red)(cancel(color(black)("cm"^3)))) = "1.0 g"#
#c_2 = "4.184 J°C"^"-1""g"^"-1"#
#ΔT_2 = T_f - "22.6 °C"#
#q_1 = m_1c_1ΔT_1 = 3.90 color(red)(cancel(color(black)("g"))) × "0.900 J·°C"^"-1"color(red)(cancel(color(black)("g"^"-1"))) × (T_f -"99.3 °C")#
#= 3.51 T_f color(white)(l)"J°C"^"-1" - "348.5 J"#
#q_2 = m_2c_2ΔT_2 = 1.0 color(red)(cancel(color(black)("g"))) × "4.184 J·°C"^"-1"color(red)(cancel(color(black)("g"^"-1"))) × (T_f - "22.6 °C")#
#= 4.184color(white)(l) T_f color(white)(l)"J°C"^"-1" - "94.56 J"#
#q_1 + q_2 = 3.51 T_fcolor(white)(l)color(red)(cancel(color(black)("J")))"°C"^"-1" -348.5 color(red)(cancel(color(black)("J"))) + 4.184 T_fcolor(white)(l)color(red)(cancel(color(black)("J")))"°C"^"-1" - 94.56 color(red)(cancel(color(black)("J"))) = 0#
#443.1 = 7.694 color(white)(l)T_f "°C"^"-1"#
#T_f = 443.1/("7.694 °C"^"-1") = "57.6 °C"#
Check:
#q_1 = m_1c_1ΔT_1 = 3.90 color(red)(cancel(color(black)("g"))) × "0.900 J"·color(red)(cancel(color(black)("°C"^"-1""g"^"-1"))) × ("57.6 -99.3") color(red)(cancel(color(black)("°C"))) = 3.51 × ("-41.7")"J" = "-146 J"#
#q_2 = m_2c_2ΔT_2 = 1.0 color(red)(cancel(color(black)("g"))) × "4.184 J"·color(red)(cancel(color(black)("°C"^
"-1""g"^"-1"))) × "(57.6- 22.6)" color(red)(cancel(color(black)("°C"))) = "241 J" - "94.56 J" = "146 J"#
#q_1 + q_2 = "-146 J + 146 J" = 0#