Option (A) is correct.
Explanation:
A peptide is written from the free –NH2 end (N-terminus) to the free –COOH end (C-terminus). Gly-Ala-Ala and Ala-Ala-Gly are therefore different tripeptides: they have the same amino acids in a different sequence (a different primary structure).
Step 1: all tripeptides. Each of the three positions can be Gly or Ala:
2×2×2=8 sequences
Step 2: remove those that do not contain both. Gly-Gly-Gly and Ala-Ala-Ala contain only one kind of amino acid:
8−2=6 tripeptides
They are Gly-Gly-Ala, Gly-Ala-Gly, Gly-Ala-Ala, Ala-Gly-Gly, Ala-Gly-Ala and Ala-Ala-Gly.
Step 3: glycine at the N-terminus. Gly-Gly-Ala, Gly-Ala-Gly and Gly-Ala-Ala: 3.
Each of these tripeptides has two peptide bonds, so complete hydrolysis of each one uses two molecules of water.

Why the other options are wrong
- (B) 8 and 4 count Gly-Gly-Gly and Ala-Ala-Ala, which do not contain both amino acids.
- (C) The 4 again includes Gly-Gly-Gly among the glycine-first peptides.
- (D) 2 counts only the compositions (two Gly + one Ala, or one Gly + two Ala). Each composition can be arranged in 3 sequences, and each sequence is a different compound.