Determine the final temperature of the mixture homework

A combination of 0.250 kg of water at 20*C, 0.400 kg of aluminum at 26.0*C, and 0.100 kg of copper at 100*C is mixed in an insulated container and allowed to come to thermal equilibrium. Ignore any energy transfer to or from the container and determine the final temperature of the mixture.

I know to use Q=mc(delta)T and that the energy lost should equal the energy gained, but how do I set up the equation for problems like this?
One of the things that I don't know how to figure out is whether the aluminum will be losing energy to the water or gaining it from the copper. So I don't know how to set this up.

Thanks.

Related Introductory Physics Homework Help News on Phys.org
dextercioby
Let the equations do the work for you. Each substance (water, copper, aluminum) will have a heat transfer: $\Delta Q_1 = m_1c_1 (T_f - T_i)$. The total $\Delta Q = \Delta Q_{water} + \Delta Q_{aluminum} + \Delta Q_{copper}$ equals zero and the final temp is the same for all.