If the ratio of people served to cups of sugar is known, the key to solving for an arbitrary number of cups is the value of that ratio.
In this case, that ratio is 6 : 1½ (6 people per 1½ cups).
This ratio can be reduced just like a fraction: 6 / 1½ = 12 / 3 = 4 / 1
This means that the reduced ratio is 4 people per 1 cup (4 : 1).
Now that the ratio has been reduced, the number of people that can be served with 9 cups of sugar is easy to find. Simply multiply the number of cups by the ratio of people to cups: 9 × (4 : 1).
This expression simplifies to 9 × 4 which is 36.
Now it is known that 9 cups of sugar is enough to serve 36 people which is unfortunately 4 shy of 40.