Tommy has a total of 20 x 3 = <<20*3=60>>60 kilograms of tomatoes.
Only 60 - 3 = <<60-3=57>>57 kilograms can be sold.
His earnings for the tomatoes will be $<<342=342>>342.
Thus, his profit will be $342 - $330 = $<<342-330=12>>12.
#### 12