There are four different positions that an African flag can take, as well as 3 positions for an European flag.
Since there are n! ways of arranging a set of n elements, then, there are 4! ways of arranging the African flags and 3! ways of arranging the European flags:
[tex]\begin{gathered} 3!=3\times2\times1=6 \\ \\ 4!=4\times3\times2\times1=24 \end{gathered}[/tex]
The total amount of ways that the two actions can be performed at the same time (choosing an order for the African flags and an order for the European flags) is the product of the number of ways that flags from each continent can be arranged:
[tex]6\times24=144[/tex]
Therefore, there are 144 ways in which the flags can be displayed.