How to figure out which two solutions will emit largest heat when they are mixed in same volumes?
You should just think about a fact: all chemical processes will correspond to enthalpy changes.

The basic process of acid-base reaction is
$$\ce{H+ + OH- -&gt; H2O}$$

This process will have an enthalpy change of $\pu{-55.8 kJ mol-1}$ at $\pu{298 K}$. (I don’t know why, but in different books or articles this value will be slightly different.) However,


Precipitate formation is usually exothermic, since there are some ion bonds formed.
Weak acid and base usually need some energy, for they are not completely ionized, during the reaction, they will to ionize more since $\ce{H+}$ or $\ce{OH-}$ is consumed. Ionization will be endothermic.


Therefore the answer would be the second reaction, since $\ce{BaSO4}$ is precipitated, which is exothermic, while weak acid and base reactions are endothermic.



(However, there seems to be always some exception, for example, ionization of $\ce{HF}$ will be exothermic. But to discuss this may be out of topic, and to be frankly, I’m not quite sure what its mechanism is.)