The AACOMAS application guide answers this question and many others, take a look - it is great!
To answer, you input both, and designate which is the most recent. The calculation will only take into account the most recent attempt (not necessarily the highest like some people think).
If you take it at different institutions, generally speaking as long as the most recent attempt is greater than or equal in terms of credits - and has a similar name; it should be okay. If they need more information, they will ask you for a syllabus etc.
For most general freshman courses it is fairly straight forward. Gen chem , bio, physics etc at the 100 level are more or less the same at different institutions.