Step 1: Read the reagents:
The first reagent, $\mathrm{P_2O_5}$ with heat, removes water. The second reagent, $\mathrm{Sn/HCl}$, supplies nascent hydrogen and reduces functional groups. We use each reagent for what it does best.
Starting compound: $\mathrm{CH_3CONH_2}$, an amide with two carbons.
Step 2: Find (A) by dehydration:
Take one water molecule out of $\mathrm{CH_3CONH_2}$. The two hydrogens come from the $\mathrm{NH_2}$ and the oxygen comes from the C=O group.
What is left is a carbon joined to nitrogen by a triple bond: $\mathrm{CH_3-C\equiv N}$.
Check by atom count: $\mathrm{C_2H_5NO} - \mathrm{H_2O} = \mathrm{C_2H_3N}$, which is the formula of acetonitrile. So (A) is acetonitrile.
Step 3: Find (B) by reduction:
The triple bond $\mathrm{C\equiv N}$ is reduced to $\mathrm{CH_2-NH_2}$. Count the hydrogen added: the group goes from 0 hydrogens to 4 hydrogens, which matches the 4[H] written over the arrow.
$\mathrm{CH_3CN} + 4[\mathrm{H}] \to \mathrm{CH_3CH_2NH_2}$.
Atom check: $\mathrm{C_2H_3N} + 4\mathrm{H} = \mathrm{C_2H_7N}$, the formula of ethylamine. So (B) is ethylamine.
Step 4: Final Answer:
Acetamide gives acetonitrile on dehydration, and acetonitrile gives ethylamine on reduction. \[\boxed{\text{(A) = acetonitrile } (\mathrm{CH_3CN});\ \text{(B) = ethylamine } (\mathrm{CH_3CH_2NH_2})}\]