The correct answer is that the final temperature will be closer to the initial temperature of substance A. This is because of the heat capacity of the two substances. Substance B can hold X amount of heat without any damage coming to it. Once it’s been added to substance A, however, it gets a boost of heat because substance A holds Y amount of heat, which is higher.
This is rather simple, but it is hard to understand for those who are uninitiated to heat transfer and how two substances work together in that regard.
The best analogy I can think of is adding dye to water. The more dye you add, the more the water looks like the dye. If you were to add more water to very dyed water, it would start to look more like water.