A hot cube warms the vat 1 degree, so it is +1°. A cold cube cools it 1 degree, so it is −1°. The sign of the second number tells you which cubes. Plus between the numbers means you dump them in (adding). Minus means you scoop them out (subtracting).
Example
What happens
Result
5 + 3 = 8
dump in 3 hot cubes
warms 3°
5 + (−3) = 2
dump in 3 cold cubes
cools 3°
5 − 3 = 2
scoop out 3 hot cubes
cools 3°
5 − (−3) = 8
scoop out 3 cold cubes
warms 3°
Look at the last row. Scooping out cold cubes adds no heat, but something cold leaves, so the vat warms. That is why subtracting a negative number is the same as adding a positive one.
You can only scoop out what is already in the vat. When there is not enough, dump in zero pairs first: one hot cube and one cold cube together, +1° and −1°, which make 0. The temperature does not change, and now there is something to scoop out.