I’m assuming you mean barium nitrite, Ba(NO2)2.
First convert grams of Ba(NO2)2 to moles using the molar mass of Ba(NO2)2. Then use the mole ratio of 4 moles of oxygen per 1 mole of Ba(NO2)2 to convert to moles of oxygen. Then use the molar mass of oxygen to convert to grams of oxygen.
45.7 g Ba(NO2)2 • 1 mol Ba(NO2)2 / 229.35 g Ba(NO2)2 • 4 mol O / 1 mol Ba(NO2)2 • 16.0 g O / 1 mol O = 12.8 g oxygen