if your teacher asks u how u got the second one, it is an in verse variation ( as the # of people go up, then the days of food goes down).
That means that the product of 24 and 20 must equal the product of 36 (20+16) and the days of food
24*20/36=12
Simple
