So the weight of 3/5 baskets is 24 kg, so a basket is 24 ÷ 3/5 = 40 kg.
So the total weight of 3/8 is: 18/5× 40 = 144 kg.
Weight of all tomatoes: 144 ÷ 3/8 = 384kg.
The number of students in Class A and Class B is 84× 3/4 = 63.
The number of 5/8 of Class A and 3/4 of Class B is ***58, with a difference of 63-58 = 5, which is caused by 5/8 of Class A and 3/4 of Class A, so the number of Class A is: 5 ÷ (3/4-5/8) = 40.
So the number of students in Class B: 84-40 = 44.