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.

When determining in which situation energy is being transferred as heat to the system in order for the system to do work, the important factor to consider is the direction of energy flow. Let's analyze each situation:

a) Two sticks are rubbed together to start a fire: In this case, the sticks are the system. Initially, the sticks possess potential energy in the form of chemical energy. As they are rubbed together, the friction between them causes the sticks to heat up, resulting in an increase in thermal energy. This energy transfer as heat to the system is accompanied by work done by the person, who applies force to the sticks. Therefore, situation a involves energy being transferred as heat to the system (sticks) for the system to do work (ignite and sustain the fire).

b) A firecracker explodes: In this case, the firecracker is the system. The firecracker contains a chemical mixture that, when ignited, undergoes a rapid combustion reaction. This reaction releases energy in the form of heat and light, causing the firecracker to explode. The energy transfer in this situation is exothermic, releasing heat to the surroundings, including the system itself. However, there is no apparent work being done on the system, so the energy transfer here is not associated with work done by an external force.

c) A red-hot iron bar is set aside to cool: In this case, the red-hot iron bar is the system. Initially, the iron bar possesses a high temperature, which indicates a substantial amount of thermal energy. As the bar is set aside, it comes in contact with cooler surroundings, such as the air or a cooler surface. Heat is transferred from the system (iron bar) to the surroundings as the thermal energy of the bar decreases. The energy transfer in this situation is heat flowing out of the system, but it is not accompanied by any work being done on the system.

Regarding the situation in which work is being done on the system in order for energy to be transferred from the system as heat, indeed, it is situation c. As explained earlier, the iron bar initially possesses a high amount of thermal energy. By setting it aside, the bar comes in contact with the cooler surroundings, and heat is transferred out of the system. Although no obvious external force is being applied, work is done by the gravitational force acting against raising the iron bar, for example, from a hot stove to a cooler surface. This work done on the system allows energy to be transferred from the system as heat.