The order does not matter. Algebraically we have y=12f(x3). Of our four transformations, (1) and (3) are in the x direction while (2) and (4) are in the y direction. The order matters whenever we combine a stretch and a translation in the same direction.