Shouldn't be too hard, it's probably just 3 SQL queries:
1. Change topic_id of all posts in topic 1 to the topic_id of topic 2.
2. Remove topic 1 which now doesn't have posts anymore.
3. Update postcount of topic 2 to include the new posts.
Not sure if there should be done anything about rights.