Catalyzes the isomerization of the aminoaldose moiety of ProFAR to the aminoketose of PRFAR in the biosynthesis pathway for histidine and the isomerization of the aminoaldose PRA to the aminoketose CdRP in the biosynthsis pathway for tryptophan. 1-(5-phospho-beta-D-ribosyl)-5-[(5-phospho-beta-D-ribosylamino)methylideneamino]imidazole-4-carboxamide = 5-[(5-phospho-1-deoxy-D-ribulos-1-ylimino)methylamino]-1-(5-phospho-beta-D-ribosyl)imidazole-4-carboxamide N-(5-phospho-beta-D-ribosyl)anthranilate = 1-(2-carboxyphenylamino)-1-deoxy-D-ribulose 5-phosphate Amino-acid biosynthesis; L-histidine biosynthesis; L-histidine from 5-phospho-alpha-D-ribose 1-diphosphate: step 4/9. Amino-acid biosynthesis; L-tryptophan biosynthesis; L-tryptophan from chorismate: step 3/5. Monomer. Belongs to the HisA/HisF family.