Catalysis of the second transesterification reaction of spliceosomal mRNA splicing. Ligation of the two exons occurs via a transesterification reaction where the free 3'-hydroxyl group of the 5' exon is the nucleophile attacking the 3' splice site. N