Generally you can do this in several ways:
First method is to create SIP extensions in each of the PBXs and register SIP trunks in the other PBX as SIP extension in the first PBX and vice-verse. This method most probably will work with most PBXs. You may create outbound rules (ARS) so dialing an extension number in the other PBX will go out through the specific trunk. The drawback is extensions in the other PBX will see a call coming from an extension in their own PBX. The method works with incoming DDI calls to both PBXs.
Second method is to use built-in 3CX bridge connection. Create a master bridge in the 3cx server and register SIP trunks from other PBX to 3cx. This will allow calling extensions in other PBX using DDI and eventually also trunks of other PBX.
Third method is so called 'Direct SIP calling'. This means placing a call without registration like '101@other_PBX_IP_address' if allowed / accepted by PBXs. Usually you should be able to call at least other PBX extensions, but not to use other PBX trunks.
Hope this helps. However, there is no universal solution.
Send me a private message with more details about your PBXs and e-mail, I could eventually help you setting interconnect.
Regards