could u please explain the 3rd equation with the molar mass? I dont understand y and how u got it? Thanks
Sure

.
The ratios I made were based on the ratios of the masses of each of the substances. To show exactly what I did, here is a step process:
x mole of PbO2 weighs y amount.
x mole of PbO weighs z amount.
Therefore, the mass ratio PbO2 : PbO is y : z.
Now, x could be any amount of mole but to make things simple, I made it equal 1. As we know, one mole of a substance equals the molar mass. Therefore the ratio of m(PbO2)/m(PbO) = M(PbO2)/M(PbO) Then by rearranging the equation, I am able to get m(PbO2) [or m(PbO)] by itself. I then did the same thing to BaO2 and BaO.
Next, I took the equation for initial mass [m(PbO2) + m(BaO2) = 15g] and substituted in my rearranged equation of the mass ratios. This meant that the variables were the same in both equations and so could be solved simultaneously. If you wanted, you could rearrange the mass ratio equations so that m(PbO) and m(BaO) are by themselves. I could then substitute this into the equation for final mass and it would still work. The aim is to get only two variables.
This is a slightly convoluted explanation so if you need more help feel free to PM me and I'll see if I can explain it another way.
Hope I helped.