This principle of the First Law of Thermodynamics says that the amount of work done is equal to the energy transferred.