According to Ross, there are $n!$ possible linear orderings of $n$ items (15). Since we are given that girls and boys alternate, odd-numbered positions must be occupied by girls and even-numbered positions must be occupied by boys. Thus the total number of permutations of all seven people is given by the basic principle of counting, which states that if two experiments are to be performed, where experiment 1 can result in any of $m$ possible outcomes and if, for each outcome of experiment 1, there are $n$ possible outcomes of experiment 2, then together there are $mn$ possible outcomes of the two experiments (Ross 2). If we let $m = 3!$ and we let $n = 4!$, then $mn = 3! \cdot4!$.
Work Cited
Ross, Sheldon M., A first course in probability, Boston, MA: Pearson (ISBN 978-0-321-86681-3). ii, 454 p. (2014). ZBL1307.60003.