We need to remember that a ratio is a fraction comparing two quantities.
We have 9 + 5 + 1 + 4 = 19 students.
And those ones who like peanuts are 5. Then, the ratio is:
9.3m questions
12.0m answers