Step 1: Understanding the Concept
Dalton's law says that each gas in a mixture exerts a partial pressure equal to its mole fraction multiplied by the total pressure.
Step 2: Key Formula or Approach
\[ p_i = x_i\,P_{\text{total}},\qquad x_i=\frac{n_i}{n_{\text{total}}} \]
Step 3: Total moles
\[ n_{\text{total}}=0.5+1.0+1.5=3.0\ \text{mol} \]
Step 4: Mole fraction of oxygen
\[ x_{\text{O}_2}=\frac{1.0}{3.0}=\frac{1}{3} \]
Step 5: Partial pressure of oxygen
\[ p_{\text{O}_2}=\frac{1}{3}\times18=6.0\ \text{bar} \]
Step 6: Check the other options
The partial pressure of \(\text{N}_2\) would be \(\frac{0.5}{3}\times18=3\) bar and that of \(\text{H}_2\) would be \(9\) bar. The three values add up to 18 bar, as Dalton's law demands. The values 4, 8 and 10 bar do not match any gas in the mixture.
Final Answer:
The partial pressure of oxygen is 6.0 bar, option (B).
\[ \boxed{6.0\ \text{bar}} \]