One team scored x goals, and the other scored y goals.
Their total was 22, so x+y =22
One team scored 4 more, so we can say that x+4 = y
Substitute x+4 in for y in the 1st equation, and solve for x:
plug in 9 for x in either of the equations and solve for y:
One team scored 13 goals; the other team scored 9 goals