3D,
Deals with how electrons fill their orbitals. I would just memorize it but you can look at it in a mathematical way in the (n + L) rule
Where n is the number, example: (2p: n = 2) (3s: n = 3) (4f: n = 4)
Where L is the letter, example: s = 0, p = 1, d = 2, f = 3
............................
So,
2p = (2 + 1) = 3
3s = (3 + 0) = 3
3d = (3 + 2) = 5 <---- highest number = highest energy
4s = (4 + 0) = 4
3p = (3 + 1) = 4
....
Thus the highest energy orbital is 3D.
If you have the Kaplan blue book (3rd edition), page 199 explains this well.