Answer:
Heat pump is a device which is used to maintain the system at a temperature more than the atmospheric temperature.
For example if you need to maintain the system at a temperature more than the room temperature (say 50° C), the heat has to be supply continuously by means of supplying an external work on the system. Otherwise the heat easily escapes from the system due to temperature gradient between system and surroundings.
According to the "Thermodynamic II law, the heat always transfer from high temperature body to low temperature body without aid of external energy, but the heat can also be transfer from low temperature body to high temperature body by means of some external energy.
From given figure, To maintain the system at temperature 50° C, you need to do external work, because some energy always lost to the surroundings