There are 84 people in class 5 (1) and class 5 (2), and there are 58 people in class 5 (1) and class 5 (2) How many people?

There are 84 people in class 5 (1) and class 5 (2), and there are 58 people in class 5 (1) and class 5 (2) How many people?

There are x people in class 51
5/8x+(84-x)3/4=58
X = 40, that is, class 51 has 40 people and class 52 has 44 people