When n teams play each other once, the total number of games is n(n-1)/2. Since each team played every other one 3 times, the relationship between number of teams (n) and number of games is ...
3(n(n-1)/2) = 198
n(n-1) = 132 = 12·11 . . . . . . multiply by 2/3 and factor
n = 12 . . . . . . n = -11 is also an extraneous solution to this quadratic equation