Total amount of food available initially: 1200 * 28 Soldier-days
After 4 days, the amount of food remaining: 1, 200 * 24 soldier-days worth.
Let N soldiers be remaining after some are transferred to another fort.
1, 200 * 24 = N * 32
N = 900
Hence, 300 soldiers were transferred.
As the number of soldiers decreases, the number of days the food lasts will increases. As the number of soldiers increases, the number of days the food lasts, will decrease. So number N of soldiers is inversely proportional to the number D of days.
So N = K / D, where K = constant of proportionality
when N = 1,200 then D = 24
So K = N D = 1,200 * 24
When D = 32, N = K / D = 1, 200 * 24 / 32 = 900
Hence, there were only 900 soldier after 4 days. So 1200 - 900 = 300 soldiers are transferred.