$$y=Af(B(x+\frac{C}{B}))+D$$
Can be thought of taking $f(x)=y$ and performing the following substitution.
$(x,y) \mapsto (Bx+C, \frac{y-D}{A})$
In order to understand what works and what doesn't work you need to understand what's going on.
Here is what is going on:
Let's say you have some function $y=f(x)$, it has some graph. This graph is a set $G$ consisting of points $(x,y)$ where $x$ is in the domain of the function.
If you consider $f(x,y)=y-f(x)=0$ then for every substitution you perform you'll witness an inverse mapping in the graph.
For example say we perform $x \mapsto x+1$, so now we have $y-f(x+1)=0$. You might expect the graph to be composed of points $(x+1,y)$ with respect to the old graph, but this is not true rather it is composed of points $(x-1,y)$, i.e. a shift left.
On the other hand say we perform $x \mapsto 2x$, now we have $y-f(2x)=0$. Now because the inverse of the mapping $x \mapsto 2x$ is $x \mapsto \frac{1}{2}x$ now the points become,
$$(\frac{1}{2}x,y)$$
Sometimes a combination of shifts, dilations, etc are needed, for example $y=x^2$ to $y=(2x+1)^2+1$ requires the substitution $(x,y) \mapsto (2x+1,y-1)$ whose inverse $(x,y) \mapsto (\frac{x-1}{2},y+1)$ tells you exactly what to do to the graph.
Computing the inverse of $(x,y) \mapsto (Bx+C, \frac{y-D}{A})$ will tell you everything you want to know.
I get $(x,y) \mapsto (\frac{x-C}{B},Ay+D)$. (You can perform this on points in your graph, one step at a time, in whichever way makes sense).
For example first shifting all $x$ coordinates to the left $C$, then scaling them by $\frac{1}{B}$, then scaling $y$ coordinates by $A$, then shifting up by $D$ makes sense.
But, doing all the same for $x$ and then shifting up $y$ by $D$ to get to $y+D$ then scaling by $A$ to get to $A(y+D)$ doesn't make sense!
We have $f(x)=\frac12(x-1)^2-3$, and let $g(x)=(3x-1)^2+1$.
Let's see what we get if we follow your sequence of transformations:
- Translation by $\binom{0}{4}$ so add $4$ to the whole expression and get $$\frac12(x-1)^2+1$$
- Vertical stretch by factor $2$, so multiply the whole expression by $2$ and get $$(x-1)^2+2$$
- Horizontal compression by factor $3$, so replace every $x$ term with $3x$ and get
$$(3x-1)^2+2$$
- Shift to the left by $\frac23$ units, so replace every $x$ term by $(x+\frac23)$ and get $$\left(3(x+\frac23)-1\right)^2+2=(3x+1)^2+2\neq g(x)$$
Now let's see what we get if we follow your teacher's sequence of transformations:
- Shift to the left by $\frac23$ units, and get $$\frac12\left((x+\frac23)-1\right)^2-3=\frac12(x-\frac13)^2-3$$
- Vertical stretch by factor $2$, and get $$(x-\frac13)^2-6$$
- Horizontal compression by factor $3$, and get $$(3x-\frac13)^2-6$$
- Translation by $\binom{0}{4}$, and get $$(3x-\frac13)^2-2\neq g(x)$$
The correct sequence should be:
- Horizontal compression by factor $3$, and get $$\frac12(3x-1)^2-3$$
- Vertical stretch by factor $2$, and get $$(3x-1)^2-6$$
- Translate vertically by $\binom{0}{7}$ and get $$(3x-1)^2+1$$ as required.
Rule of thumb: start with the innermost transformation and work outwards.
Generally order does not matter if the transformations consist only of translations or only of enlargements. But if there are translations and enlargements in the same axis direction, then order matters.
So for example if you take the graph of $y=x^2$ and first stretch by factor $3$ horizontally, and then translate by $\binom{1}{0}$ you will get firstly $(\frac13x)^2$ and then $\left(\frac13(x-1)\right)^2$
But the same two transformation in reverse order would result in firstly $(x-1)^2$ and then $(\frac13x-1)^2$ and clearly these resulting expressions are not the same.
Best Answer
We have $$ f(ax+b)=f(a(x+\tfrac ba)) $$ corresponding to a stretch by a factor $\frac 1a$ followed by a horisontal translation by $-\frac ba$. You simply invert the operations, so multiplied by $a$ becomes stretched by $\frac 1a$ and adding $\frac ba$ becomes shifted by $-\frac ba$. So in steps: