The question says the machine uses up m gallons of oil each hour on weekends.
This means that if the machine works for 24 hours each day, it implies that:
[tex]\text{Total amount of oil used up in a day = 24}\times m=24m[/tex]There are only two days on weekends i.e. Saturday and Sunday.
This means that if the amount of oil used in 1 day in the weekend is 24m, then we can say:
Saturday: oil used is 24m
Sunday: oil used is 24m
Total oil used during the weekend is:
[tex]24m+24m=48m[/tex]