This is a simple question let's take a look at the following picture:
We can see above first we have group one and after we changed the way factors are grouped. For the Assosiative Property of Multiplication, the way factors are grouped does not change the result, so that is the property that justifies the step from Line 1 to Line 2. Now let's take a look ate the next picture:
As we can see from line 2 to line 3 we changed just the order of the numbers. For the Commutative Property of Multiplication, even we change the order of the numbers of the multiplication we do not change the product. So o that is the property that justifies the step from Line 2 to Line 3.