There are 9 aircraft in total so if they were all different there would be 9 factorial arrangements in a straight line=362880. But there are only 3 types of aircraft. The Y-wings can be arranged in 24 different ways, but these all look the same and these duplicated arrangements are included in 362880, so we need to divide by 24: 15120. Similarly, there are 2 duplications with the A-wings, so that gives us 15120/2=7560; and 6 duplications with the X-wings, giving us 7560/6=1260 formations.