There are two ways to solve this. The first way is logically. Mary can -wear a pink dress with black shoes -wear a pink dress with white shoes -wear a blue dress with black shoes -wear a blue dress with white shoes -wear a yellow dress with black shoes - wear a yellow dress with white shoes
Count them up, and you'll get six combinations!
Another way is simply mathematically, which is easier in my opinion.