If we assume equal variances, this is a two-sample t-test and formula for degrees of freedom is:
df = (n1 + n2) - 2
n1 = first sample size = 12
n2 = second sample size = 9
df = (12+9) - 2
df = 19
For unequal variances, the formula is much more complicated and would require actual variances to compute. Given that you weren't given those here, I suspect this is a two-sample t-test with equal variances assumed. I hope this helps.