From my point of view:
- the permission to AVD are managed by Groups AVD Users CompanyA, AVD Users CompanyB and AVD Users CompanyAB so even you setup trust user@companyA.com must be member of AVD Users CompanyB and AVD Users CompanyAB in order to get access to both Host Pools.
- There is a few options to merge AD and it depends of your scenario, but based on the link you provided users will be able to use their logins without merge as well "Users sign in by using either the Azure Virtual Desktop application or the web client, with a UPN in a format such as john@companyA.com, jane@companyB.com, or joe@newcompanyAB.com, depending on their configured UPN suffix."
If you decide to merge local environment users from CompanyA and Company B will have one AD and one login NewCompanyAB to local and AVD environment.
- I don't have another idea.