My teacher defined $*: S_n \times \mathbb{Z}[x_1,...,x_n]\rightarrow \mathbb{Z}[x_1,...,x_n]$, such that: $$g*f(x_1,...,x_n)=f(x_{g(1)},...,x_{g(n)} )$$
She left us an exercise to check that $\alpha*(\beta*f)=(\alpha \circ \beta)*f$.
I proved (certainly there is a mistake I cannot find) that this doesn't hold and that $\beta$ and $\alpha$ swap:
$$\alpha*(\beta*f(x_1,...,x_n))=\alpha*f(x_{\beta(1)},...,x_{\beta(n)})=\alpha*f(u_1,...,u_n)$$
Here I have named $u_j=x_{\beta(j)}$. This holds for every $j$, in particular, when $j=\alpha(i)$, thus:
$$\alpha*(\beta*f(x_1,...,x_n))=f(u_{\alpha(1)},...,u_{\alpha(n)})=f(x_{\beta\circ\alpha(1)},...,x_{\beta\circ\alpha(n)})=$$ $$(\beta\circ\alpha)*f(x_1,...,x_n)$$
Your teacher made a common error. (Edit: See below for a potential confusion). Probably thought that $\alpha*f(x_{\beta(1)},\cdots,x_{\beta(n)})$ would equal $f(x_{\alpha(\beta(1))},\ldots,x_{\alpha(\beta(n))})$, but that does not quite work.
Indeed, to see it doesn't work, take $n=3$, $\alpha=(12)$, and $\beta=(13)$. Then $\beta*g$ will exchange the first and third arguments of $g$, and $\alpha*h$ will exchange the first and second arguments of $h$. As we note in the comments, the right-to-left convention means that $\rho=\alpha\circ\beta=(132)$, so $$(\alpha\circ\beta)*f(x_1,x_2,x_3) = \rho*f(x_1,x_2,x_3) = f(x_{\rho(1)},x_{\rho(2)},x_{\rho(3)}) = f(x_3,x_1,x_2).$$ On the other hand, $$\begin{align*} \alpha*(\beta*f(x_1,x_2,x_3)) &= \alpha*f(x_3,x_2,x_1)\\ &= f(x_2,x_3,x_1), \end{align*}$$ which would agree with composition left-to-right, but not with composition right-to-left.
For instance, if $f(x,y,z) = xy^2z^3$, then $(13)*f(x,y,z) = f(z,y,x)$, and $(12)*f(z,y,x) = f(y,z,x)$, so $(12)\circ(13)*f(x,y,z) = yz^2x^3$. But $(132)*f(x,y,z) = f(z,x,y) = zx^2y^3\neq yz^2x^3 = f(y,x,z)=(123)*f(x,y,z)$.
To define a left action by acting on the indices, you need the formula $$\alpha*f(x_1,\ldots,x_n) = f(x_{\alpha^{-1}(1)},\ldots,x_{\alpha^{-1}(n)}).$$
Okay, there is some confusion here and in the comments, because there are actually two ways of interpreting this action.
Because of how it is written, I am interpreting the action as follows:
Thus, my calculations above: $(13)$ acts on the tuple $(x_1,x_2,x_3)$ by putting what was in the $\sigma(1)=3$rd entry into the first position, leaving the second position in place, and putting what was in the $\sigma(3)=1$st entry into the third position; that is, exchanging entries in positions $1$ and $3$, giving $(x_3,x_2,x_1)$. Similarly, $(12)$ acts on a $3$-tuple by exchanging entries in the first and second position, so when applied to $(x_3,x_2,x_1)$ we get $(x_2,x_3,x_1)$.
And $(12)(13) = (132)$ acts by putting the $\sigma(1)=3$rd entry in the first position, the $\sigma(2)=1$st entry in the second position, and the $\sigma(3)=2$nd entry in the third position. So applying it to $(x_1,x_2,x_3)$ we get $(x_3,x_1,x_2)$. That is, $(132)$ acting on $(x_1,x_2,x_3)$ does not yield the same result as first letting $(13)$ act on it, and then letting $(12)$ act on the result.
So if we "feed" the result of letting $(13)$ act on $(x_1,x_2,x_3)$ and then letting $(12)$ act on the resulting $(x_3,x_2,x_1)$ to get $(x_2,x_3,x_1)$, into polynomial $f$, we will get $f(x_2,x_3,x_1)$. Whereas if we "feed" the result of letting $(132)$ act on $(x_1,x_2,x_3)$ into $f$, we will get $f(x_3,x_1,x_2)$, which is not necessarily the same end result.
(I interpret it this way because that is the standard way to let a permutation act in, say, a wreath product, which is where I usually encounter this type of "index shuffling".)
Taking $f(x_1,x_2,x_3) = x_1x_2^2x_3^3$, the result of doing $(12)*\Bigl( (13)*f\Bigr)$ is $$f(x_2,x_3,x_1) = x_2x_3^2x_1^3$$ whereas doing $(132)*f$ will give $$f(x_3,x_1,x_2) = x_3x_1^2x_2^3.$$
This interpretation actually defines a right action; if we want to turn it into a left action, we use the standard correspondence, which is to let $g$ act on the left like $g^{-1}$ acts on the right, hence $\sigma*f$ being $f$ applied to $(x_{\sigma^{-1}(1)},\ldots,x_{\sigma^{-1}(n)})$.
However, one may also interpret it as follows:
For a single permutation, the two actions yield the same answer: if $$f(x_1, \ldots,x_n) = \sum \alpha_{(a_1,\ldots,a_n)}x_1^{a_1}\cdots x_n^{a_n}$$ where $\alpha_{(a_1,\ldots,a_n)}=0$ for almost all tuples, then shuffling the output will give $$\sum \alpha_{(a_1,\ldots,a_n)}x_{\sigma(1)}^{a_1}\cdots x_{\sigma(n)}^{a_n}$$ which is also what we get if we evaluate $f(x_{\sigma(1)},\ldots,x_{\sigma(n)})$, because that is $$\sum \alpha_{(a_1,\ldots,a_n)}x_{\sigma(1)}^{a_1}\cdots x_{\sigma(n)}^{a_n}.$$
But this behaves differently under composition: looking again at $f(x_1,x_2,x_3) = x_1x_2^2x_3^3$, if we first apply the permutation $\sigma(13)$ to this output, we get $$x_{\sigma(1)}x_{\sigma(2)}^2 x_{\sigma(3)}^3 = x_3x_2^2x_1^3 = x_1^3x_2^2x_3.$$ If we then apply the permutation $\tau=(12)$ to this monomial, we get $$x_{\tau(1)}^3 x_{\tau(2)}^2 x_{\tau(3)} = x_2^3 x_1^2 x_3 = x_1^2x_2^3x_3 = f(x_3,x_1,x_2).$$ And this is the same as applying $\rho=\tau\sigma=(12)(13) = (132)$ to $x_1x_2^2x_3^3$: $$x_{\rho(1)} x_{\rho(2)}^2 x_{\rho(3)}^3 = x_3x_1^2x_2^3 = x_1^2x_2^3x_3.$$
This does define a left action.
Wherein lies the potential confusion. Your calculations were concordant with my first interpretation. The one in the comments below by Mor A are working with the second plausible reading.
If we think of $\mathbb{Z}[x_1,\ldots,x_n]$ as functions with domain tuples, the first interpretation is more sensible. If we think of them as the polynomial expressions, the second is more sensible. I am used to actions on tuples, so I did the first interpretation.