Answer: 25 adults, 50 children and 96 students
Explanation:
12x + 5*(2x) + 7*(171-3x) = 1222
12x + 10x + 1,197 - 21x = 1222
x = 1222 - 1,197 = 25 is the number of adults.
2*25 = 50 is the number of children
50*5 = 250
25*12 = 300
300+250 = 550
1222-550 = 672
672/7 = 96