Can I perform a transaction across two different MySQL databases on two different servers in different tables
This is a duplicate question. It seems like this is a possibility with InnoDB as your engine, but other than that, unfortunately, it does not seem like there is a way. This also seems dependent on the version of MySQL, like 5.6 and above, the thread I linked to points to a documentation here.

A side note: just because this seems to a possibility, it may not be the best solution. It seems that it would be best to write the transaction, and use a script to run the transaction on both servers.