There is an interesting post here about where TCD-UCD would be in the THES university rankings if the two universities merged. To answer this question, you need to know the criteria on which the rankings are based. Currently, TCD is 117 and UCD is 159. Being optimistic, the poster says that the joint university could be as high as 104.
Rankings should not be the reason to merge. The universities should merge if it makes good academic sense to merge, if the overall education and research would improve. If the new university was better than the sum of the parts, then one assumes it would naturally rise in the rankings as a consequence. Then again, do rankings really measure what they are supposed to measure?
This merger was first proposed by Minister of Education Donogh O’Malley in 1967, by the way. Peter Sutherland in 2010 also proposed the merger, saying the result would be in the top 20. That might take a while.