(a)Repetitions are allowed?
Choose the 1st digit any of these 6 ways {1,2,3,4,5,6}
Choose the 2nd digit any of these 6 ways {1,2,3,4,5,6}
Choose the 3rd digit any of these 6 ways {1,2,3,4,5,6}
Choose the 4th digit any of these 6 ways {1,2,3,4,5,6}
Choose the 5th digit any of these 3 ways {2,4,6}
That's 6 = 3888 ways.
(b)Repetitions are NOT allowed?
We must choose the last digit first to make sure it's even:
Choose the 5th digit any of these 3 ways {2,4,6}.
Choose the 1st digit any of the 5 ways remaining that weren't used in the 5th
digit.
Choose the 2nd digit any of the 4 ways remaining that weren't used in the 5th
or 1st digits.
Choose the 3rd digit any of the 3 ways remaining that weren't used in the 5th,
1st, or 2nd digits.
Choose the 3rd digit any of the 2 ways remaining that weren't used in the 5th,
1st, 2nd, or 3rd digits.
That's 3 = 360 ways.
Edwin