The order of Class Types displayed when setting up a Group Appointment and in the Patient Booking Gateway can be chosen using the blue arrows from System Information > Appointment Book > Class Types as pictured below:
The list of patients in the Group Appointment will be ordered alphabetically and currently this cannot be changed. We are happy to change your question into an idea if this is a feature that you and other users would like to see in the future.