before, trains worked using the steam engine. thus, it uses heat so it is crucial to apply heat balance. the steam engine absorbs energy during the stage of boiling water. so, this is the endothermic reaction. when the steam is used to work the piston, it has to release this energy through running the train. the excess energy is released as an exhaust to the chimney. this is the exothermic process because it releases energy to the surroundings.