The temperature of thermal equilibrium in this scenario can be determined by using the principle of energy conservation. This means that the total energy of the system before and after the addition of the fourth substance must be equal. Therefore, you can use the specific heat capacities and initial temperatures of the three substances to calculate the energy they possess, and then use this information to determine the final temperature at which all four substances will be in thermal equilibrium. This temperature will be the same for all substances in the system. So, yes, the temperature of thermal equilibrium is necessary to solve the problem accurately.