Answer:
it depends
Step-by-step explanation:
When the transformation is written in functional form:
g(x) = a·f(x) . . . . vertical expansion by a factor of "a"
g(x) = f(a·x) . . . . horizontal compression by a factor of "a"
the transformation can be determined by the locations of the various scale factors (and offsets).
__
When the function is written out, as in two of your examples, the transformation is subject to some "interpretation."
y = 2x² . . . . . can be considered a vertical stretch of x²
y = (2x)² . . . . can be considered a horizontal compression of x²
y = 4x² . . . . . can be considered a vertical stretch of x²
Please note that these last two examples have identical graphs. It depends on what you consider to be the parent function, and how you consider the transformation to be applied. The use of parentheses can guide your interpretation of the transformation.
Different transformations can have the same result, so which way you interpret the equation depends on what you consider to be the parent function and how you consider the transformation to be applied. Often, the context of the question is involved, too.