The average power will be (P1+P2)/(duty cycle)
A 50% duty cycle would be 0.5, and your Duty cycle would be (5/(5+30))
P1 is (Vin-4)/I1; P2 = (Vin-1.25)/I2
Compute I1 and I2 for the different values of V and your 2 ohm load.
You can put an optocoupler across the POT and turn the optocoupler on to get the 1.25 output voltage.
The actual calculations escape me for the moment, but you typically need the power dissipation from the above calcs, Junction temp for silicon (Usually about 150 C I think), and the ambient temp. Usually you also have to add the thermal resistances as well for the washer. etc. to select the heat sink.
So, do the calcs above for starters.