Class A has 18 pupils and class B has 16 pupils.

Both classes sit the same maths test.
The mean score for class A is 61.
The mean score for both classes is 61.
What is the mean score in the maths test for class B?

let the mean for class B be x

total score for A = 18*61 = 1098
total for B = 16x
1098 + 16x = 61*34
16x = 976
x = 61