Final answer:
The work done by the heat engine is calculated using the difference between heat absorbed from the hot reservoir and heat exhausted into the cold reservoir, resulting in 21 kJ of work done.
Step-by-step explanation:
The work done by a heat engine can be calculated using the first law of thermodynamics which states that the energy added to the system (heat absorbed from the hot reservoir) minus the energy that leaves the system (heat exhausted into the cold reservoir) is equal to the work done by the system. In the case of the heat engine in question, it extracts 51 kJ from the hot reservoir and exhausts 30 kJ into the cold reservoir.
Using the equation Work Done = Heat In - Heat Out, we can calculate the work done by this heat engine. Thus, the work done is 51 kJ (the energy extracted from the hot reservoir) minus 30 kJ (the energy exhausted into the cold reservoir), which equals to 21 kJ of work done by the engine.