How to know whether to add latent heat when calculating final temperature? From the examples in my textbook, it is usually very easy to see whether you need to account for the latent heat when calculating the final temperature. For example, if you add 2 x 13 gram ice blocks to a 250 ml cup of water, it is obvious that the ice will melt, and you will have to account for the latent heat of fusion for the ice.

However, what if it isn’t so obvious whether one of the substances will undergo a phase change? For example, what if we added 15 grams if ice to 20 ml of oil? If the final temperature is below 0, then we don’t need to account for the latent heat for ice, otherwise we will have to. How do we determine whether the ice will experience a phase change, and more generally, how do we determine whether one of the substance will experience a phase change?
It is less obvious than you seem to assume (say, if water cup in your example were already at $0^\circ$C, then the ice would not melt), but still pretty obvious.

The rule of thumb is:


Assume there is no phase change.
Calculate the final temperature.
Check whether there is a phase change in any of the substances involved as they go from starting to final temperature.
If no, we are done. If yes, assume there is a phase change and go back to step 2.