Step 1: State the rule
Number of neutrons \(=A-Z\), where \(A\) is the mass number (top) and \(Z\) is the atomic number (bottom).
Step 2: Calculate each
(A) Mg: \(24-12=12\), which is (II).
(B) Al: \(27-13=14\), which is (IV).
(C) Be: \(9-4=5\), which is (I).
(D) C: \(12-6=6\), which is (III).
Step 3: Match with options
The pairing is A-II, B-IV, C-I, D-III, which is option (B). The other options pair at least one element with a wrong neutron count.
Final Answer:
The matching is A-II, B-IV, C-I, D-III, option (B).
\[ \boxed{\text{(B)}} \]