We can solve the problem by using the first law of thermodynamics:

where
is the variation of internal energy of the system
Q is the heat added to the system
W is the work done by the system
In this problem, the variation of internal energy of the system is

While the heat added to the system is

therefore, the work done by the system is

It might be radiation and reflection but I’m not sure
When two sound waves of similar frequency interfere with each other, there is a fluctuating sound heard which is periodic and repeating. This fluctuating sound is called beat. Beat frequency( number of beats per second) is equal to the difference of the frequency of the two sound waves.
So, sound waves of frequency 400 Hz and 404 Hz will produce 4 beats per second.