Recall that in a finite group , the order of an element divides the order of , i.e. .
The cycle (234) is contained in , and as this cycle has order 3, we have that 3 must divide . Similarly, the cycle (1342) is an element of , and so 4 must divide .
And you also know (from Lagrange's theorem) that the order of a subgroup divides the order of the group, which is why the order of must divide the order of , which is 24.