Total number of home goals / Total number of home games = 2.5
Total home goals = 9 + 6 + 8 + 7 = 30
Let the total number of home games = H
So 30/ H = 2.5 multiply both sides by H, divide both sides by 2.5
30 / 2.5 = H = 12 home games
Similalrly.....THe total number of away games is 2 + 7 + 4 + 5 = 18
Let the away games = A
So we have that
18 / A = 1.8
18 / 1.8 = A = 10 away games
So....total games = 12 + 10 = 22