You need to set the domain in Exchange Online to "Internal relay", as detailed here: https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/manage-accepted-domains/manage-accepted-domains#configure-the-domain-type
This will ensure that for any recipients that Exchange Online cannot find internally, messages will be routed through the MTA specified by the MX record. Similarly, on HostGator side you need to designate those 5 users as external and configure some form of forwarding to ensure proper message delivery.