a. There are 9 choices of first digit taken from the range 3-B; there are 11 choices for the last digit in the range 5-F; and there are 16 choices of digit for the remaining 3 positions. This means there are
9 × 16³ × 11 = 405,504
such hexadecimal numbers.
b. There are 10 choices for the first digit (4-D), 13 choices for the last digit, and 16 for the other 4 positions. So there are
10 × 16⁴ × 13 = 8,519,680
such hexadecimal numbers.