1200 soldiers in a fort had enough food for 28 days. After 4 days, some soilders were sent to another fort and thus, the food lasted for 38 more days. How many soilders left the fort?

let the food needed each day per soldier be x units

total food available = 1200(28)x = 33600x
after 4 days, 6/7 of the amount would be left
or (6/7)(1200)(28)x
= 28800x

let the number of soldiers who left be n
so (1200 - n)(x)(38) = 28800x
(1200-n)(38) = 28800
45600 - 38n = 28800
-38n = -16800
n = 442.1

442 soldiers left the fort

check:
suppose each soldier needed 2 kg per day
total needed for the 28 days = 2(1200)(28) or 67200 kg
food used in 4 days = 4(2)(1200) = 9600 kg

So amount of food left = 67200-9600= 57600 kg

442 soldiers left, so
remaining soldiers = 758
amount used by those 758 for 38 days
= 38(758)(2)
= 57608 , close enough