The formation of a tri-snRNP complex containing U4 and U6 (or U4atac and U6atac) snRNAs and U5 snRNAs and associated proteins. This includes reannealing of U4 and U6 (or U4atac and U6atac) snRNAs released from previous rounds of splicing to reform the U4/U6 snRNP (or U4atac/U6atac snRNP) as well as the subsequent association of the U5 snRNP with the U4/U6 snRNP (or U4atac/U6atac snRNP) to form a tri-snRNP that is ready to reassemble into another spliceosome complex.