An acid anhydride is what you get if you remove a molecule of water from two carboxylic acid -COOH groups. For example, if you took two ethanoic acid molecules and removed a molecule of water between them you would get the acid anhydride, ethanoic anhydride (old name: acetic anhydride).
For equation purposes, ethanoic anhydride is often written as (CH3CO)2O. The reactions of acid anhydrides are rather like those of acyl chlorides except that during their reactions, a molecule of carboxylic acid is produced rather than the HCl formed when an acyl chloride reacts.
Figure 1: Acid Anhydrides react with ammonia, 1o amines and 2o amines to form amides.
If ethanoic anhydride is added to concentrated ammonia solution, ethanamide is formed together with ammonium ethanoate. Again, the reaction happens in two stages. In the first stage, ethanamide is formed together with ethanoic acid.
\[ (CH_3CO)_2O + NH_3 \rightarrow CH_3CONH_2 + CH_3COOH\]
Then the ethanoic acid produced reacts with excess ammonia to give ammonium ethanoate.
\[ CH_3COOH + NH_3 \rightarrow CH_3COONH_4\]
When combined together to give one overall equation:
\[ (CH_3CO)_2O + 2NH_3 \rightarrow CH_3CONH_2 + CH_3COONH_4\]
You need to follow this through really carefully, because the two products of the reaction overall can look confusingly similar.