Let "a" and "b" represent the numbers of people on teams Alpha and Beta, respectively. The problem statement tells you
a = (1/4)b
b - 6 - 12 = a + 12
The first equation can be rewritten to give an expresion for b:
b = 4a
This can be substituted into the second equation to get
4a -18 = a +12
3a = 30
a = 10
There were originally 10 people on team Alpha.