You look at the sign behind the second term. Here are some examples...
2x + 8 - 4x You are going to subtract 2x - 4x because there is a negative sign behind the 4x.
8y + 1 + y You are going to add 8y + y because there is a positive sign behind the y.
4 + 2x - 5 + 7x You are going to subtract 4 - 5 because there is a negative sign behind the 5. You are going to add 2x + 7x because there is a positive sign behind the 7x.
Since Box A has a volume of 64 cubic meters, that means each side length is 4 m3. It says to make Box B, they divided these lengths by 2. With that info, you get 8 as your volume