Let's assume all the items were bottles of water.
107 * $1 = $107
The difference from the actual result is $21.
If we changed each bottle of water to a pretzel, that would increase by $0.5.
$21 / $0.5 = 42
Hence, the class sold 42 pretzels and (107 - 42) = 65 bottles of water.