Yes, it is possible to configure an Exchange hybrid setup from company B to the default tenant (created for company A) and use company A's mail domain, as well as reverse sync users from Office 365 to company A's Active Directory using AAD Connect.
- Creating a trust between the domains will allow for the sharing of resources and authentication between the two domains.
- AAD Connect (Multiple forests, single Azure AD tenant topology) can be used to connect the two Active Directories and synchronize user information.
- Creating a tenant for company A with the default domain as CompanyA.com will allow for the use of Office 365 services with that specific domain.
- Creating an Exchange Hybrid configuration from company B to the Office 365 tenant will allow for the migration of email to the cloud.
- Reverse syncing company B users from Office 365 to company A's Active Directory is possible, but it may require additional configuration and planning.
- Extending company A's network to the company B site and joining the workstations to the company A domain will allow for the use of company A's resources and services.
- Adding company B's domain as an accepted domain in Office 365 will allow for email to be sent and received using that domain.
- Changing company B users' mail domain to company A and routing migrated company B users' mail through Office 365 will ensure that all email communication is using the same domain.
- Creating an Exchange Hybrid configuration from company A to Office 365 will allow for the migration of email for company A as well.
- Completing the company A mail migration will finalize the process of migrating all email to the cloud and decommissioning the on-premises Exchange servers.
However, it's important to consider that this process could be complex and may require additional planning and testing to ensure a smooth migration. It would be best to consult with a professional before proceeding with the migration.