How many O atoms are in the formula unit #Ba(NO_3)_2#?
The idea here is that subscripts that follow a closed parenthesis are distributed to all the elements that are written inside the parentheses.
By comparison, subscripts that follow the chemical symbol of an element are distributed only to that element.
Take a look at the nitrate anion. Here you have a
#"O"_color(red)(3) = color(red)(3) xx "O" = "3 atoms of oxygen"#
Now, the barium cations have a
Since the nitrate anion contains more than one element, you must enclose it in parentheses and add the
#color(blue)(2) xx "NO"_3^(-) = ("NO"_3)_color(blue)(2)#
Since you have two nitrate anions in one formula unit of barium nitrate, and since each nitrate anion contains
#color(blue)(2) xx (color(red)(3) xx "O") = color(darkgreen)(ul(color(black)("6 atoms of oxygen")))#