Calculate the amount 1 man can eat per day from the known amounts:
200 kg / 40 days = 5 kg of wheat per day / 20 men = 0.25 kg per man per day.
Now calculate the time it will take 10 men:
10 men x 0.25 kg per day = 2.5 kg per day.
300 kg / 2.5 kg per day = 120 days