Sorting Categories within Categories

That is done by the category settings -

You can also sort them manually by going to your admin settings and looking for

fixed category positions

If checked, you will be able to arrange categories into a fixed order. If unchecked, categories are listed in order of activity.

fixed category positions on create

If checked, category ordering will be maintained on topic creation dialog (requires fixed_category_positions).

You can then reorder them via the categories page and where you create a new category you can reorder them