Catalyzes the condensation of 6-hydroxymethyl-7,8-dihydropterin pyrophosphate (DHPP) with 4-(beta-D-ribofuranosyl)-aminobenzene-5'-phosphate (beta-RFA-P) to form 7,8-dihydropterin-6-methyl-4-(beta-D-ribofuranosyl)-aminobenzene-5'-phosphate, a precursor in the biosynthesis of 5,6,7,8-tetrahydromethanopterin (H4MPT). To a lesser extent, is able to condense beta-RFA-P with another arylamine, 1-(4-aminophenyl)-1-deoxy-D-ribitol (APDR), to form 7,8-dihydropterin-6-methyl-1-(4-aminophenyl)-1-deoxy-D-ribitol. Dephosphorylated beta-RFA-P is not a substrate. (7,8-dihydropterin-6-yl)methyl diphosphate + 4-(beta-D-ribofuranosyl)aminobenzene 5'-phosphate = diphosphate + N-[(7,8-dihydropterin-6-yl)methyl]-4-(beta-D-ribofuranosyl)aniline 5'-phosphate Cofactor biosynthesis; 5,6,7,8-tetrahydromethanopterin biosynthesis. Belongs to the metallo-beta-lactamase superfamily.