The intuitive distinction between the direct proportional equation $y=kx$ and the inverse proportion $xy=k$ is whether the variables rise and fall in the same direction.
In your problem, the number of people increased and the length of time their (fixed) food supply lasted decreased. (The 54 kg of food stayed the same in the problem and is therefore not a variable -- actually, the precise number is irrelevant.) That is what indicates an inverse proportional function like $3\times30=k=(3+x)\times18$.