Using the associative property, the order of the factors is not changed, but the grouping is changed. The expression is simplified correctly.