@Daemon has given you a correct physical explanation while also incorporating sound nutritional advice.
I initially did it like
@sayon basak and then I realised that the initial average is not always defined so I tried a slightly different approach (ironically, this occurred to me while I was making a protein shake!):
Let x = old total runs conceded and y = old total number of wickets (i.e. before 1-45 or 2-90).
Note: if y = 0 then the old average is undefined (as you can't divide by zero).
After 1-45: new average = (x + 45)/(y + 1) (i.e. new total runs/new total wickets)
After 2-90: new average = (x + 90)/(y + 2)
1-45 results in a better new average iff
(x + 45)/(y + 1) < (x + 90)/(y + 2)
Cross-multiplying:
(x + 45)(y + 2) < (x + 90)(y + 1)
Expanding:
xy + 2x + 45y + 90 < xy + x + 90y + 90
Cancelling common terms:
x < 45y
Case I: y = 0 (no previous wickets taken)
1-45 and 2-90 will result in the same new average of 45 as long as no previous runs have been conceded (x = 0) because you will then have 45/1 cf. 90/2.
However, if at least 1 previous run has been conceded (x > or = 1) then 2-90 will result in the better new average because it will then be like 46/1 cf. 91/2 (for x = 1).
Case II: y > or = 1 (at least 1 previous wicket taken)
x < 45y
Division by y is now permissible therefore
x/y < 45
x/y is the old average so as long as the old average is less than 45, 1-45 will result in the better new average. If the old average is 45 then both 1-45 and 2-90 will result in the new average being 45. If the old average is greater than 45, 2-90 will result in the better new average.
(I tend to go over things a lot and refine my previous thinking as (full disclosure) I have OCD)