First of all, I should point out that there are two ways to understand the lambda calculus, it can be typed or untyped. Not all lambda terms can be typed.
First observe that the term $λxyz.xy(zx)$ can be typed. Since it takes three arguments, let us say the type is
$$\alpha\to\beta\to\gamma\to\delta$$
so that given $x:\alpha, y:\beta,z :\gamma$ we obtain $xy(zx):\delta$.
Now in the body, $z$ is applied to $x$, so this means $\gamma = \alpha\to\eta$, and $zx : \eta$. Similarly, $x$ is applied to $y$ and $zx$, so it must be that $\alpha = \beta\to\eta\to\delta$. Putting this together we get that
$$λxyz.xy(zx) : (\beta\to\eta\to\delta)\to\beta\to((\beta\to\eta\to\delta)\to\eta)\to\delta.$$
We can now check that if
$$x : \beta\to\eta\to\delta\\y:\beta\\z : (\beta\to\eta\to\delta)\to\eta$$
then
$$zx: \eta\\xy:\eta\to\delta\\xy(zx):\delta.$$
What this means is that for the application $(λxyz.xy(zx))\ u\ v\ w$ to make sense in the typed setting, it must be that for some given types $\beta,\eta,\delta$ we have $u:\beta\to\eta\to\delta$, $v :\beta$, and $z:(\beta\to\eta\to\delta)\to\eta$. Since $\mathbb N$ is not a function type, the first and third arguments cannot be of type $\mathbb N$.
Now if you still wish to give some sense in an untyped setting to the term $(λxyz.xy(zx))\ 1\ 2\ 3$, you can only do this if you interpret $1, 2,3$ as lambda terms. You can do this using a Church encoding, that is if you define
$$0 := \lambda s.\lambda z. z\\
1:=\lambda s.\lambda z. sz\\
2:=\lambda s.\lambda z. s(sz)\\
3:=\lambda s.\lambda z. s(s(sz)).$$
Then, your expression $1\ 2\ (3\ 1)$ corresponds to the term
$$(\lambda s.\lambda z.sz)(\lambda s.\lambda z.s(sz))((\lambda s.\lambda z.s(s(sz)))(\lambda s.\lambda z. sz))$$
which you can reduce further.
You could also check out this question for an explanation of the structure of a lambda term.