Order merged query by shared field
Duplicate? How do I combine search for categories and entries into one set of search results?

You will have to use something like supersort to sort your array.

{% set classesLocations = craft.entries.section('classes')|merge(craft.categories.group('locations'))|supersort('sortAs', '{ startTime }') %}