Let A have a people and B have a + 20 people.

Total score from A = 70a. Total score from B = 85(a + 20) = 85a + 1700.
Combined total score = 70a + 85a + 1700 = 155a + 1700.
Combined number of people = a + (a + 20) = 2a + 20.

Combined average = (155a + 1700) ÷ (2a + 20) = 79.
155a + 1700 = 79(2a + 20) = 158a + 1580.
1700 − 1580 = 158a − 155a.
120 = 3a, so a = 40.

A has 40 people, B has 40 + 20 = 60 people.
Check: (40×70 + 60×85) ÷ 100 = (2800+5100)÷100 = 79. ✓