You want to think of your permutations as functions. In your example, let $f:\{1,2,3,4\}\rightarrow\{1,2,3,4\}$ be the function represented by $(1,2,3)$. This means that
\begin{align*}
f(1)=2,\quad f(2)=3,\quad f(3)=1,\quad \text{and} \quad f(4)=4.
\end{align*}
In a similar way, let $g:\{1,2,3,4\}\rightarrow\{1,2,3,4\}$ be the function represented by $(1,2)(3,4)$. So
\begin{align*}
g(1)=2,\quad g(2)=1,\quad g(3)=4\quad\text{and}\quad g(4)=3.
\end{align*}
Then if we do $(1,2,3)$ and then do $(1,2)(3,4)$, then this is the same as doing $f$ and then $g$. So we get that
\begin{align*}
1\stackrel{f}{\longmapsto}2\stackrel{g}{\longmapsto}1\\
2\stackrel{f}{\longmapsto}3\stackrel{g}{\longmapsto}4\\
3\stackrel{f}{\longmapsto}1\stackrel{g}{\longmapsto}2\\
4\stackrel{f}{\longmapsto}4\stackrel{g}{\longmapsto}3.\\
\end{align*}
So we may represent the effect of doing $f$ and then doing $g$ by $(2,4,3)$. Since this is the effect of doing $(1,2,3)$ and then doing $(1,2)(3,4)$, you have that
\begin{align*}
(1,2)(3,4)(1,2,3)=(2,4,3)
\end{align*}
if you are composing permutations from right to left.
Note: If you are composing permutations from left to right then you would get
\begin{align*}
(1,2)(3,4)(1,2,3)=(1,3,4).
\end{align*}