You have 5 red shirts, 5 green shirts, \(8\) pairs of pants, \(7\) green hats and 8 red hats, all of which are distinct. How many outfits can you make consisting of one shirt, one pair of pants, and one hat without having the same color of shirts and hats?
What I would do is take the cases with the red shirts and the cases with the green shirts seperately. For the red shirts, you have 5*8*7 possibilities of outfits and for the green shirts, you have 5*8*8 possibilities of outfits. The total is 280+320=600 total outfits.
So your answer is 600 total outfits.
Hope this helps you understand!