Step-by-step oxidation process:
- Ethanol (\( \text{C}_2\text{H}_5\text{OH} \)) is first oxidized to ethanal (\( \text{CH}_3\text{CHO} \)), which is compound \( A \).
- Ethanal is further oxidized to ethanoic acid (\( \text{CH}_3\text{COOH} \)), which is compound \( B \).
Final Answer: The names of compounds \( A \) and \( B \) are \( \mathbf{\text{ethanal, ethanoic acid}} \), which corresponds to option \( \mathbf{(2)} \).