First “.local” isn't supported for publish, you need to change it to ".com".
Then, if you want to merge them into one, you need to use a unified domain name for them before creating AAD Connect, such as "Bdomain.com" for both of them. For local AD, you could add a new accepted domain(from local Exchange) and lookup zone(from local AD) to change it from "Adomain.local" to "Bdomain.com", you also need to buy DNS record for it.
After using a unified domain name for them, you will could use SMTP matching to connect them: How to merge an Office 365 account with an on-premises AD account after hybrid configuration?
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
If there also exist mailbox for local AD, you cannot keep both local mailbox and Exchange online mailbox, you can only keep one for them. You can only merge the AD account without merge mailbox.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.