Step 1: Recall the relation between bond order and bond length.
Bond length is inversely proportional to bond order.
Higher bond order means stronger bonding and hence smaller bond length.
\[
\text{Bond length} \propto \frac{1}{\text{Bond order}}
\]
Step 2: Determine the bond order of \(B_2\).
Electronic configuration of \(B_2\) according to molecular orbital theory is
\[
(\sigma1s)^2(\sigma1s^*)^2(\sigma2s)^2(\sigma2s^*)^2(\pi2p_x)^1(\pi2p_y)^1
\]
Bond order is
\[
\text{B.O.}=\frac{N_b-N_a}{2}
\]
\[
=\frac{6-4}{2}
\]
\[
=1
\]
Thus, \(B_2\) has bond order \(1\).
Step 3: Determine the bond order of \(C_2\).
Electronic configuration of \(C_2\) is
\[
(\sigma1s)^2(\sigma1s^*)^2(\sigma2s)^2(\sigma2s^*)^2(\pi2p_x)^2(\pi2p_y)^2
\]
Bond order is
\[
=\frac{8-4}{2}
\]
\[
=2
\]
Thus, \(C_2\) has bond order \(2\).
Step 4: Determine the bond order of \(N_2\).
Electronic configuration of \(N_2\) is
\[
(\sigma1s)^2(\sigma1s^*)^2(\sigma2s)^2(\sigma2s^*)^2(\pi2p_x)^2(\pi2p_y)^2(\sigma2p_z)^2
\]
Bond order is
\[
=\frac{10-4}{2}
\]
\[
=3
\]
Thus, \(N_2\) has bond order \(3\).
Step 5: Compare the bond lengths.
Since bond length decreases with increase in bond order,
\[
B_2 \gt C_2 \gt N_2
\]
Therefore,
\[
X_3 \gt X_1 \gt X_2
\]
Step 6: Final conclusion.
Hence, the correct order of bond lengths is
\[
\boxed{X_3 \gt X_1 \gt X_2}
\]