How many 7-digit even numbers less than 3,000,000 can be formed using the following digits: 1, 2, 2, 3, 5, 5, 6?

I understand this part:

There are four cases:

1 is the first digit, 6 is the last digit << Case 1

2 is the first digit, 6 is the last digit<< Case 2

2 is the first digit, 2 is the last digit<< Case 3

1 is the first digit, 2 is the last digit <<Case 4

...But. This is the part I don't understand

Why is it that for case 1, the answer is

5! / (2!2!) ?

How do we get the 5 and why do we use 5 and not 7? I understand the denominator, since there are duplicates of 2 AND 5, but why 5 in the numerator and not 7?

For case 2 to 4, the answer is

5! / 2!

Why is it 5 and not 7 again? and how come this time there is only one duplicate taken into consideration in the denominator? What happens to the other one?

Please explain this as clearly as possible. Thank you for your help.