Compared with the other two groups, the math group has 12 people, so the math group has (180+ 12)÷2=96 (people).
So the sum of the other two groups is 180-96=84 (person).
There are four more people in the science and technology group than in the art group, so the science and technology group has (84+4)÷2=44 (people).
So the art group has 84-44=40 (people)
So there are 96 people in the math group, 44 people in the science and technology group and 40 people in the art group.