Without looking this up, this looks like the Org Syn prep of phthalimides from amino acids. If not that reaction, then it won't result in the product indicated.
If you were to mix the two reagents together without triethylamine. The reaction would slow down halfway through the reaction with the newly formed carboxylic acid protonating the amine. You could add triethylamine to release the amine and allow the reaction to go to completion. In this case, the product will be the amide-acid as its triethylammonium salt. However, with phthalic anhydride, that isn't necessary. The reaction will go to completion without any triethylamine. Amines can be protected from acylation by forming a salt with HCl, but even this does not completely protect the amines.
If I am remembering correctly, in the Org Syn prep, a catalytic amount of triethylamine is used with phthalic anhydride and an amino acid heated in toluene with a water trap. In that case, I think triethylamine is used to solubilize the amino acid and increase the reaction rate.
I am at a disadvantage in trying to guess how you are doing the reaction. If I were doing this reaction, I would skip the TEA.