There are $40\div\frac{84-79}{79-76}=24$ students in class $B.$  There are $(40+24)\div\frac{89-81}{81-79}=16$ students in class $C.$  $24:16=3:2$ 
After a test, teacher Valeria collects the data of the scores. Given that:  The average score of class $A$ is $76$.  The average score of class $B$ is $84$.  The average score of class $C$ is $89$.  The average score of class $A$ and $B$ is $79$.  The average score of all the three classes is $81$.  There are $40$ students in class $A.$ What is the ratio of number of students of class $B$ to that of $C$? 

1) $3:2$ 
2) $1:1$ 
3) $4:1$ 
4) $5:2$ 
5) $2:3$ 