Oof. This is a nightmare question. To join two different databases (I would create a clone of each and pick the large of the two as the target, and the smaller one as the non_target) then you would need to write a script to merge the tables (in a non duplicate/destructive way). Each table would have to be merged from one database to the other.
Some sticking points are:
Users that exist in both would need to be merged from one to the other. ie. Users that exist in non target would have to be made in the target. The same with Agents.
Any tickets/tasks on the old (non-target) would need to be moved to the target system. Those tickets and tasks would need to check and see if the ticket_id/Ticket# already exists and create new ticket_id/Tickets then all those tickets / threads / tasks / etc would need to be re-assigned to a new user_id (the user id that they have in the target system). Agent responses would need to be attributed to the existing Agents response, or the new Agent accounts.
I would say that when you first set this up you could have probably used a single database and used mysql replication to do this, but after the fact it sounds like a huge migraine to accomplish.