Heat management of thermally coupled reactors for conducting simultaneous endothermic and exothermic reactions