You need to use your formula q=mCp :delta: T
or
q = mCp(tf - ti)
Where
q = energy
m = mass
Cp = heat capacity of substance
t = temperature (final and initial)
You are going to have to solve for tf in case you haven't figured it out, which will be the same for both the hot and cold water (since they're reaching equilibrium). You will probably also have to make two equations (one for the ice and one for the hot water) and set them equal to each other (which I believe is what Astrokel was trying to say by Qloss=Qgain). Your equation will look something like:
mCp(tf-ti) = mCp(tf-ti)
Where one side represents the ice and one side represents the hot water.
This is a strange question though, and worded (like usual) in an overly confusing way. They say a styrofoam cup because styrofoam is insulating, meaning that in this particular problem, they only want you to think about the heat transfer between the ice and the hot water. This is deceiving since after the ice melts, the water will all mix, and the unspoken part of this equation is that the melted ice will retain its own temperature until equilibrium is met (not by mixing). Hopefully I'm not confusing you even more at this point, but I'll continue.
Think about this ice being in some sort of plastic bag (with no air space) so that it is not mixing with the hot water. This would mean that even after the ice melts, it has its own temperature (0oC) even after melting all the way and will still absorb heat from the hot water. That means that there is still heat being transferred even after the ice is completely melted and that the two different temperature waters are not yet at equilibrium.
Since you only asked about the third part, that's all I wrote about, but if you need further explanation, let me know.
I didn't want to solve it for you, but I think I gave enough information for you to figure it out on your own.
Good luck. (Don't forget to Snack me if it helped)