If Greg deposited $120 into his account and Thomas increased his money by 20% and they still got the same amount in November, it means that $120 is 20% of their money in October.
120 = 20% * x (where x is the money in October)
120 = 20/100x
120 = 2/10x
120 = 1/5x / * 5 (both sides)
x = 600
So each of them had $600 in October.
Doublecheck:
Greg's money = 600 + 120 = 720
Thomas' money = 600 + 20% * 600 = 600 + 120 = 720
So it's correct :)