Step 1: Reagent selectivity:
$\text{H}_2/\text{Ni}$ is a non-selective hydrogenation catalyst. $\text{LiAlH}_4$ delivers hydride to polar $\text{C=O}$ groups.
Step 2: Sample A:
Both $\text{C=C}$ and $\text{CHO}$ take up hydrogen, giving the saturated alcohol $\text{CH}_3(\text{CH}_2)_3\text{CH}_2\text{OH}$.
Step 3: Sample B:
Only the aldehyde is reduced, so the alkene survives: $\text{CH}_3\text{CH=CHCH}_2\text{CH}_2\text{OH}$. This is option (D).
Final Answer:
P is saturated alcohol and Q retains the double bond.
\[ \boxed{\text{(D) }\text{P = pentan-1-ol, Q = pent-3-en-1-ol}} \]