Tie 1 and 2 together and arrange them with 5. There are a (2,2 2) * a (2 2,2) = 2 * 2 = 4 kinds.
There are three spaces between them and on the side, so that 3 and 4 can be "inserted".
Therefore * * has 4 * a (3 3,2) = 4 * 6 = 24 arrangement methods.