Calculate the final temperature when a 18.7 gram sample of ice at 0 degrees C is placed into a styrofoam cup containing 113 grams of water at 71.6 degrees C. Assume that there is no loss or gain of heat from the surroundings.

Heat of fusion of ice = 333 Jg^-1
Specific heat of water = 4.184 JK^-1g^-1
a.) Final temperature = ________ degrees C

b.) Calculate the entropy change that occurs during this process.
Entropy change = ________ JK^-1

Please show and explain because I tried doing it but I messed up some distributions and I can't get the right answer.

heat absorbed by ice + heat absorbed by water from melted ice at zero C + heat lost by warm water = 0

[mass ice x heat fusion] + [mass melted ice x specific heat water x (Tfinal-Tinitial)] + [mass warm water x specific heat water x (Tfinal-Tinitial)] = 0
Solve for Tfinal, the only unknown in the equation.

To calculate the final temperature when ice and water are mixed, we need to consider the heat exchange that occurs during the process. The heat gained by the ice, Q_ice, is equal to the heat lost by the water, Q_water. We can use the principle of conservation of energy to express this as an equation:

Q_ice = Q_water

The heat gained by the ice can be calculated using the equation:

Q_ice = mass_ice * heat_of_fusion

where mass_ice is the mass of the ice and heat_of_fusion is the heat of fusion of ice (333 Jg^-1).

The heat lost by the water can be calculated using the equation:

Q_water = mass_water * specific_heat_water * (final_temperature - initial_temperature_water)

where mass_water is the mass of the water, specific_heat_water is the specific heat capacity of water (4.184 JK^-1g^-1), initial_temperature_water is the initial temperature of the water (71.6 degrees Celsius), and final_temperature is the final temperature of the mixture.

Now, let's plug in the given values:
mass_ice = 18.7 g
heat_of_fusion = 333 Jg^-1
mass_water = 113 g
specific_heat_water = 4.184 JK^-1g^-1
initial_temperature_water = 71.6 degrees Celsius

Using the equation Q_ice = Q_water, we can solve for the final_temperature.

Q_ice = Q_water
mass_ice * heat_of_fusion = mass_water * specific_heat_water * (final_temperature - initial_temperature_water)

Substituting the given values:

(18.7 g) * (333 Jg^-1) = (113 g) * (4.184 JK^-1g^-1) * (final_temperature - 71.6 degrees Celsius)

Now, we can solve for the final_temperature:

(18.7 g) * (333 Jg^-1) = (113 g) * (4.184 JK^-1g^-1) * (final_temperature - 71.6 degrees Celsius)

Dividing both sides by [(113 g) * (4.184 JK^-1g^-1)]:

[(18.7 g) * (333 Jg^-1)] / [(113 g) * (4.184 JK^-1g^-1)] = final_temperature - 71.6 degrees Celsius

Finally, adding 71.6 degrees Celsius to both sides:

final_temperature = [(18.7 g) * (333 Jg^-1)] / [(113 g) * (4.184 JK^-1g^-1)] + 71.6 degrees Celsius

Now, you can calculate the final_temperature using the above equation.

For part b, to calculate the entropy change, we can use the equation:

Entropy change = (heat lost by the water / temperature of the water at which the heat is lost) - (heat gained by the ice / temperature of the ice at which the heat is gained)

The entropy change can be calculated using the following equation:

Entropy change = (Q_water / initial_temperature_water) - (Q_ice / 0 degrees Celsius)

Remember, Q_water is the heat lost by the water, Q_ice is the heat gained by the ice, initial_temperature_water is the initial temperature of the water, and 0 degrees Celsius is the temperature at which the heat is gained by the ice.

Now, you can plug in the values and calculate the entropy change using the above equation.

Keep in mind that in both calculations, you should be consistent with the units of mass and temperature to obtain accurate results.