When amino acids react with each other, how do you know which one reacts using it's carboxylic group and which one with it's amine group?
Under physiological conditions (aqueous solution, pH near neutral), amino acids don't react with each other directly, and the equilibrium lies on the side of peptide bond hydrolysis, not formation.


  When amino acids react with each other, how do you know which one reacts using it's carboxylic group and which one with it's amine group?


In the cell, amino acids first react with ATP, then form an ester with RNA, and then their amino group forms a peptide bond with the growing amino acid chain. The last step is catalyzed by ribosomes that select the next amino acid to be added using messenger RNA as a template.


  For example the dipeptide val-ser, between the amino acids valine and serine, does valine's amino group react or does it's carboxylic group with serine's respective group?


In your example, valine and serine could form either valyl-serine or seryl-valine. As Tyberius writes in the comments, peptides are written so that in each peptide link, the amino acid on the left of the link provides the carboxylic acid group and the one of the right of the link provides the amino group. The very first amino acid (the one at the amino terminus) carries an amino groups that has not undergone peptide bond formation, and the last amino acid (the one at the carboxy terminus) carries a carboxylate group that has not (yet) undergone peptide bond formation.