A 25.0 g sample of iron at 398K is placed in a styrofoam cup containing 25.0 mL of water at 298K. Assuming that no heat is lost outside the cup, what will the final temperature of the water be? What will the final temperature of the iron be?

I set them equal to each other to solve for the final temp. but I don't seem to get any reasonable answers.

I figured i should use
qH2O= 25.0 x 4.184 x (_ -25)
and
qFe = 25.0 x 0.449 x (_ -125)

the sum of the heats gained is zero.

qH2O+qFe=0
25*4.184(Tf-398K)+24*.449*(Tf-298)=0

now solve for Tf in that.

To solve this problem, we need to use the principle of heat transfer, which states that heat gained by one object is equal to the heat lost by the other object.

In this case, we have two objects: the iron and the water. The heat gained by the water (qH2O) is equal to the heat lost by the iron (qFe).

The formula to calculate heat transfer is:
q = m * c * ΔT

Where:
q is the heat transferred
m is the mass of the substance (in grams)
c is the specific heat capacity of the substance (in J/g°C)
ΔT is the change in temperature (final temperature - initial temperature)

For the water:
qH2O = mH2O * cH2O * ΔTH2O

For the iron:
qFe = mFe * cFe * ΔTFe

The given values are:
mH2O = 25.0 mL = 25.0 g (since the density of water is 1 g/mL)
cH2O = 4.184 J/g°C (specific heat capacity of water)
ΔTH2O = final temperature - initial temperature = final temperature - 298 K

mFe = 25.0 g (given)
cFe = 0.449 J/g°C (specific heat capacity of iron)
ΔTFe = final temperature - initial temperature = final temperature - 398 K

Since we assume no heat is lost to the surroundings, the heat gained by the water is equal to the heat lost by the iron. Therefore, we can set them equal to each other and solve for the final temperature (denoted as T):

qH2O = qFe
mH2O * cH2O * ΔTH2O = mFe * cFe * ΔTFe

Plugging in the known values:
25.0 * 4.184 * (T - 298) = 25.0 * 0.449 * (T - 398)

Now, we can solve this equation for T.