A notebook needs units and interval boundaries. Convert mA to A before P = V x I. Calculate each constant-power interval with E = P x t, then add successive interval energies. For the whole run, average power is total energy divided by total time. These are declared ideal model readings; they do not establish temperatures or safe component ratings.
Worked example
A separate example uses 1 W for 2 seconds, followed by 3 W for 2 seconds. Energy is 2 J + 6 J = 8 J over 4 seconds, so average power is 8 / 4 = 2 W. Adding the two powers to get 4 W would not describe this successive run.
Notebook records: one run, two successive intervals
Interval A is the first 5 seconds: a resistor has 8 V across it and 50 mA through it. Interval B is the next 5 seconds: a different resistor setting has 8 V across it and 100 mA through it. Values stay constant within each interval. There is no additional time or energy between intervals. Use these records as given; no real circuit is built.