These data is given :
Mass of boron = 0.096g
Mass of oxygen = 0.144g
Mass of sample = 0.24g
% of composition by weight = (weight of substance/ Total weight of sample ) X 100
Thus, percentage of boron by weight in the compound =( 0.0960 × 100)/0.24 = 40%
Thus, percentage of oxygen by weight in the compound = (0.144× 100)/ 0.24 = 60 %