The property you're thinking off is called the
associative property. When stated formally for addition and subtraction, it means:

What this boils down to is that it doesn't matter whether you add/multiply a-and-b and c or a and then b-and-c - you'll end up with the same value from either. Once you understand it for addition, multiplication follows naturally, since one of the ways we define multiplication is as repeated addition. Notice that this property is also what lets us write expressions like 3 + 4 + 5 unambiguously, and without parentheses.