Answer:
Let's call the number of soldiers that should leave the group as x.
We know that the group of 30 soldiers has enough food for 40 days. And we want to find the number of soldiers that should leave the group so that the food is enough for 100 days for remaining soldiers.
We can use the proportion of soldiers to days of food to find the number of soldiers needed for 100 days of food.
30/40 = (30-x) / 100
We can cross-multiply and then solve for x:
1200 = 30x - x^2
x^2 + 30x -1200 = 0
x = 20 or x = -40
20 is the valid solution, so 20 soldiers should leave the group.
So, 20 soldiers should leave the group so that the food is enough for 100 days for remaining soldiers.