Reversable reactions can be exothermic and endothermic
In reversable reactions, if the reaction is endothermic in one direction, it will be exothermic in the other
The energy transferred from the surroundings by the endothermic reaction is equal to the energy transferred to the surroundings during the exothermic reaction
An example of thermal decomposition is hydrated copper sulfate: hydrated copper sulfate ⇌ anhydrous copper sulfate + water
If you heat blue hydrated copper(II) sulphate crystals, it drives the water off and leaves white anhydrous copper(II) sulfate powder. This is endothermic
If you then add a couple of drops of water to the white powder you get the blue crystals back again. This is exothermic