Consider each case separately:
1) Three digit numbers - First digit must be a five or a six, and last digit must be 2,4,6 (even number). So deal with the restrictions first.
Suppose the first digit is 5, then there are 3 choices for the last digit (2,4,6), and hence for the middle digit, there...