Let the stock of grain last for x days for 6000 people.
The number of people and the days for which stock will last are in inverse proportion.
∴ 6000 × x = 4000 × 30
∴ x = (4000 x 30)/6000 = 20
∴ The stock of grain will last for 20 days for 6000 people.