a. Two sticks are rubbed together to start a fire.
b. A firecracker explodes.
c. A red-hot iron bar is set aside to cool.
In which of the situations listed above is energy being transferred as heat to the system in order for the system to do work?
I would say A & B.
In which situation is work being done on the system in order for energy to be transferred from the system as heat?
I would say C.
Nuts. One has to define the system.