Advise:

This will not work as expected if both companies are still using skype.

Ideally what you want is to be full Teams mode

To configure external access and users being able to talk between different 365 Tenants

Log into Tenant 1 365 Admin console / Teams section / org Wide section / External Access

Tenant 1

Enable External access ( Teams ) – Skype optional if still using Skype. But be aware the messages from teams instead will go to Skype .

If your tenants are on full teams mode you do not need the first two options ticked

 If an external users sends a message to a user in islands mode, it’s always going to Skype!

Add on tenant 1 tenant 2 as allowed domain and you will do the same vice-versa

on tenant 2 you will add the domain of tenant 1 as allowed external access

This change is not immediate applied , be patient!