billpa,
I haven’t actually done this, but I too have pondered this in the past as I’ve considered making a dual cab, with back-to-back setups, with the ability to work together as well.
I’m pretty sure this can be accomplished by adding a KVM switch and a Monitor Splitter cable. You'd also need your 2 Monitors, 2 PCs (each running their own MAME), 2 IPACs and 2 Control Panels.
In my thinking, the key would be to wire your 2nd PCs Control Panel to the Player 2 inputs on its IPAC. On the same 2nd PC, you would need to configure MAME to recognize those inputs as Player 1 controls, rather than Player 2 controls. When this IPAC (2nd) is connected to the 1st PC (via KVM), the controls will be recognized as Player 2. At the same time, the 1st PCs IPAC, wired for Player 1 will be directly connected to PC1 which would give you your 2 player simultaneous scenario.
I’ll try to add some detail later, but that’s something for you to chew on.