The amount of p in compound 1 = 0.42g
The amount of Q in compound 1 = 3.15-0.42 = 2.73g
Ratio of masses of P and Q = 42:273 = 2:13
The amount of Q in compound 2 = 7.41
Amount of P in compound 2 = 9.12-7.41 = 1.71g, Ratio of P and Q in 2nd compound = 171:741= 3:13. The amount of Q is fixed so ratio of P combined with fixed mass of Q = 2:3 is a simple whole number ratio. This is LAW OF MULTIPLE PRPOPORTION