Why is heat energy dissipation in two intervals frame dependent? 
The question asks for heat produced in the given specific conditions. It seems like an application of the work-energy theorem with friction doing work on the block and dissipating the heat in the process. I decided to do it from two frames:- 1) the ground frame and 2) the belt frame and expected to get the same answer as the same amount of heat energy must have been produced in the two intervals from both frames

From ground frame :-
For H1 :-
final velocity = 0 m/s
       initial velocity = 20 m/s

For H2:-
Final velocity = 10 m/s (moves along with the belt)
      Initial velocity = 0 m/s (was just going to have friction causing it to move in the same 
                                 direction)

From belt frame :-
For H1:-
Initial velocity = 30 m/s (as we will have to use relative velocity)
      Final velocity = 10 m/s (when friction will just start acting in the same direction)

For H2:-
      Initial velocity = 10 m/s
      
     Final velocity:- 0 m/s ( as it is brought to relative rest with respect to the belt finally)

The official answer given was 8.
I have theorized that this has potentially something to do with the fact that work is frame-dependent and somehow changing frames affect the energy measured. However, I am unable to comprehend how changing frames brings about a discrepancy in energy change. Alternatively, I have also thought that the heat generated by friction should only be calculated with respect to the surface (in this case the belt, which also provides the correct answer) on which it dissipates the heat and the slipping is occurring, However, I am not able to come up with an explanation of why this is the case in a rigorous manner( i.e. if this theory of mine is even correct at all)
Edit:-
I get after some discussion with user netflix_and_physics that my mistake lies in the fact that I am not considering the work done by friction on the belt in the ground frame case. I am still uncertain as to how to calculate this work of friction on the belt with respect to the ground frame.
 A: There is a method I've developed for solving a tricky friction problem like this that always works, and never fails to deliver the desired understanding.  I'm going to present it here for the laboratory frame of reference (the more complicated case) and leave it to you to  apply to the belt frame of reference situation.
The method involves treating the interface between the block and belt as a separate body of zero mass, with its upper surface moving at the velocity of the block and its lower surface moving at the velocity of the belt.  Since the interface has no mass, it has no kinetic energy to contend with.  However, work is done on this body at both its upper and lower surfaces.
For simplicity, I'm going to assume that the frictional force of magnitude F is constant.  If we apply Newton's 2nd law to the block,  we obtain $$v=-20+\frac{F}{m}t$$ for the velocity of the upper surface of our interface body in the positive x direction.  The displacement of the upper surface is then $$s=-20t+\frac{F}{2m}t^2$$.  The time required for the block to stop moving is 20m/F, and the time required for the block to reach the belt velocity is 30m/F.  So the displacement of the upper surface up to the time the block velocity is zero is $$s=-20\left(20\frac{m}{F}\right)+\frac{F}{2m}\left(20\frac{m}{F}\right)^2=-200\frac{m}{F}$$and the displacement up to the time that the block reaches the belt velocity is $$s=-20\left(30\frac{m}{F}\right)+\frac{F}{2m}\left(30\frac{m}{F}\right)^2=-150\frac{m}{F}$$Since the force exerted by the block on the upper surface of our interface body is in the negative x direction, the work done by this force F at the upper surface of our body up to the time that the block velocity is zero is $$W_{upper}=200 m$$and the work done by this force F at the upper surface of our body up to the time that the block reaches belt velocity is $$W_{upper}=150m$$
Now for the lower surface of our interface body.  The velocity of this surface is constant at v = 10 m/s, and the force F exerted by the belt on our interface body is in the positive x direction.  So, by a similar analysis to that above, the work done by the belt at the lower surface of our body up to the time that the block velocity is zero is $$W_{lower}=200m$$, and the work done by the belt on the lower surface of our body up to the time that the block reaches belt velocity is $$W_{lower}=300m$$
So the net work done on the interface body over the time that the block is traveling in the opposite direction of the belt is $$W_{net}=200m+200m=400m$$and the net work done on the interface body over the entire time until the block reaches belt velocity is $$W_{net}=150m+300m=450m$$So the net work done during the time that the block is traveling in the same direction as the belt $$W_{net}= 450m-400m=50m$$
Since the interface body has no mass, its change in internal energy $\Delta U$ must be zero, and, from the first law of thermodynamics, the heat flow out or the interface must equal the net work done on the interface.  So the ratio of the two heat flows must be $$\frac{H_1}{H_2}=\frac{400m}{50m}=8$$
