Workout plan:
-40 min running and swimming
Gregory burns
-20 cal/min running (r)
-10 cal/min swimming (s)
Between runnung and swimming you have to add up to 40 min.
The total calories he wil burn is equal to the time he spends running plus the time he spends swimming, both values multiplied by the corresponding calories he is supposed to burn:
C=20r+10s
C= total calories burnt in one work out
r= total minutes he ran
s=total minutes he swam
Note: r+s cant be grater than 40min