Note first that regardless of the chemical equation, we will need 2 atoms of X for every 3 atoms of O. With this in mind, we can string together our formula as though it were a simple unit conversion:
10g O * (1 mol O / 16 g O) * (2 mol X / 3 mol O) * (56 g X / 1 mol X) = 23 g X
Of course, this is much easier to see if I could write it with horizontal lines, but hopefully that makes sense to you.