Solution (source code)

= Solution

Compose <permutations> from right to left. The indicated cycle lengths immediately give $X^3=P^2=Q^2=e$. Under <conjugation>, $X^{-1}(ab)X=(X^{-1}a\ X^{-1}b)$. Since $X^{-1}$ sends $1,2,3$ to $3,1,2$ and fixes $4$,
$$
\boxed{X^{-1}PX=(31)(24)=Q,\qquad
X^{-1}QX=(32)(14)=(14)(23)=PQ.}
$$
Direct composition also gives $PQ=QP=(14)(23)$. Thus $V=\{e,P,Q,PQ\}$ is a <Klein four-group>. <Conjugation> by $X$ cycles its three nonidentity elements, so $X$ normalizes $V$.

The <cosets> $V,VX,VX^2$ have four elements each and are distinct. If two coincided, a nontrivial power of $X$ would belong to $V$, impossible because it has order three whereas every nonidentity element of $V$ has order two. Hence the <subgroup> generated by $X,P,Q$ contains at least twelve elements. These generators are <even permutations>, so the <subgroup> lies in the <alternating group> $A_4$, whose order is $4!/2=12$; multiplying by one fixed transposition pairs even and odd <permutations> to justify this count. Therefore
$$
\boxed{A_4=\langle X,P,Q\rangle.}
$$
The calculation also describes $A_4$ as the <semidirect product> $V\rtimes\langle X\rangle$, with the order-three factor permuting the three involutions.