Part (a)
Eighteen electrons can have the designation n = 3.
There is 3s, 3p, and 3d orbitals. The s orbital can hold 2 electrons. The p orbital can hold 6 electrons and the d orbital can hold 10 electrons. Summing these values we get 2 + 6 + 10 = 18 electrons.
Part (b)
Ten electrons can have the designation n = 5 and l = 2.
n = 5 and l = 2 is 5d. The d orbital can hold a maximum of 10 electrons.
Part (c)
Two electrons are in n = 6, l = 3 and ml = -1.
Only 2 electrons are allowed in each suborbital, which is what ml is.