You can try setting something like that up using CB Auto Actions. Either using a Code action to execute the PHP for it or a Query action to act on the database of your second site directly. It's by no means an easy thing to implement however so I don't recommend it unless you've PHP and/or SQL experience. Alternative I suppose is to look into Multisite extensions for Joomla to see if any support CB.