Exothermic reaction releases energy and hence if the beaker is closed, all the energy will turn up as the increase in temperature, and hence temperature in the beaker with exothermic reaction increases.
Endothermic reaciton absorbs energy, hence the if the beaker is closed, all the energy is going to be absorbed by the reaction and hence the temperature will fall in this beaker.