I fill in Ted's exquisite answer.
This is tricky - the two cases look the same, but they're not.
The first one is a right action $v \cdot (p_1 \cdot p_2) = (v \cdot p_1) \cdot p_2$,
while the second one is a left action $p_1 \cdot (p_2 \cdot f) = (p_1 \cdot p_2) \cdot f$.
To see why, consider these 2 permutations:
$\color{tomato}{p_1(1) = 1, p_1(2) = 3, p_1(3) = 2} $
$\color{tomato}{p_2(1) = 3, p_2(2) = 2, p_2(3) = 1}.$
Let's write out explicitly what the actions are in the two cases to see the difference.
First, let's work out what the compositions $p_1 \cdot p_2$ and $p_2 \cdot p_1$ are.
The composition $p_1 \cdot p_2$ is: $\qquad p_1(p_2(1)) = 2, p_1(p_2(2)) = 3, p_1(p_2(3)) = 1$
while the composition $p_2 \cdot p_1$ is: $\qquad p_2(p_1(1)) = 3, p_2(p_1(2)) = 1, p_2(p_1(3)) = 2.$
Observe that they are not the same. We will use these later.
Now let's look at the 2 actions. The first action is on vectors. By the definition of the first action, $$p_1 \cdot (v_1, \color{magenta}{v_2}, \color{limegreen}{v_3}) = (v_{\LARGE{p_1(1)}}, \color{limegreen}{v_{{\LARGE{p_1(2)}}}}, \color{magenta}{v_{\LARGE{p_1(3)}}}) = (v_1, \color{limegreen}{v_3}, \color{magenta}{v_2}). $$
In words: $p_1$ acting on a vector interchanges the second and third coordinates. Similarly, $$p_2 \cdot (v_1, v_2, v_3) = (v_3, v_2, v_1). \tag{♥} $$ In words: $p_2$ acting on a vector interchanges the first and third coordinates.
In this situation, I find that thinking in words reduces the confusion: $p_1$ interchanges the second and third coordinates, not $v_2$ and $v_3$. You'll see the difference below. Hence:
$\begin{align} p_1 \cdot (p_2 \cdot v) = p_1 \cdot (p_2 \cdot (v_1, v_2, v_3)) = by (♥) = p_1 \cdot (v_3, \color{magenta}{v_2}, \color{limegreen}{v_1}) & = (v_3, \color{limegreen}{v_1}, \color{magenta}{v_2}) \tag{☼}\\ & \neq (v_{\LARGE{p_1(1)}}, v_{{\LARGE{p_1(2)}}}, v_{\LARGE{p_1(3)}}). \end{align} $
If the last equality seems wrong, use the "words" description of $p_1$: Interchange the second and third coordinates.)
Question: Does $p_1 \cdot (p_2 \cdot v) = (p_2 \cdot p_1) \cdot v$ or $(p_1 \cdot p_2) \cdot v$? Don't need to calculate these two.
Just look at the orange to determine if $(v_3, \color{limegreen}{v_1}, \color{magenta}{v_2})$ in $(☼)$ is $(v_{\Large{p_1(p_2)(1)}},v_{\Large{p_1(p_2)(2)}}, ...)$ or $(v_{\Large{p_2(p_1)(1)}}, v_{\Large{p_2(p_1)(2)}}, ...)$.
Conclusion: For the first action, on vectors, $p_1 \cdot (p_2 \cdot v) = (p_2 \cdot p_1) \cdot v$.
So this is not a left action, but a right action.
Now look at the second action, which is not on vectors, but on real-valued functions on the set of all vectors. By definition, $$(p_1 \cdot f)(x_1, x_2, x_3) = f(x_{\LARGE{p_1(1)}}, x_{\LARGE{p_1(2)}}, x_{\LARGE{p_1(3)}}) = f(x_1, x_3, x_2).$$
In words: To evaluate $p_1$ applied to a function at a vector, interchange the second and third coordinates of the vector, then apply the function.
Similarly, for $p_2$, $(p_2 \cdot f)(\color{limegreen}{x_1}, x_2, \color{magenta}{x_3}) = f(\color{magenta}{x_{\LARGE{p_2(1)}}}, x_{\LARGE{p_2(2)}}, \color{limegreen}{x_{\LARGE{p_2(3)}}}) = f(\color{magenta}{x_3}, x_2, \color{limegreen}{x_1})$
The words version is: To evaluate $p_2$ applied to a function at a vector, interchange the first and third coordinates of the vector, then apply the function.
So what is $p_1 \cdot (p_2 \cdot f)$, applied to a vector? It is $$ \begin{align} (p_1 \cdot (p_2 \cdot f))(x_1, x_2, x_3) = (p_2 \cdot f)(\color{limegreen}{x_1}, x_3, \color{magenta}{x_2}) & = f(\color{magenta}{x_2}, x_3, \color{limegreen}{x_1}) \\ & \neq f(x_{\LARGE{p_2(1)}}, v_{{\LARGE{p_2(3)}}}, v_{\LARGE{p_2(2)}}). \end{align} $$
(Again, using the "words" description may reduce the confusion.) Now is this last term $p_1 \cdot p_2$ or $p_2 \cdot p_1$ applied to $f$? It is the former, as you can see from the orange calculations of $p_1 \cdot p_2$ above.
Conclusion: $p_1 \cdot (p_2 \cdot f) = (p_1 \cdot p_2) \cdot f$. This one is a left action.
I hope this clears up why these two cases aren't the same. Of course, I haven't yet proven that these are actions in general (I've only illustrated it for the particular $p_1$ and $p_2$ above), but hopefully this will give you the right idea for the general proof.
The key point is to remember that with these definitions, we are permuting the coordinates of the vector according to $p$, rather than the indices of the $v$'s according to $p$. If we did the latter instead, then the left and right action cases above would be reversed. See alias vs alibi for more discussion of this point.