The answers in each case are:
a. 42.
b. 122.
Step-by-step explanation:
In the first case, you should know that the temperature is calculated from the highest temperature to the lowest, in which case:
82 - 40 = 42.
In the second case, when temperatures are negative, you must first bring them to zero and then calculate with the largest positive number, as shown below:
82 + 40 = 122.