arrange 7 flage taken 2 at a time
so as there are only two flags be arranged with 7 different colors so the first flag can be arranged in any 7 ways and as for the second flag we have only 6 flag left(as 1 flag is already used) so it can be arranged in 6 ways
so total 7 × 6 = 42 ways it can be arranged