Two elements A and B combine to form compounds X and Y. For a fixed mass of A, the mass of B that combines to form the compounds X and Y are in the ratio 3:7. If in the compound X, 4 g of A combines with 12 g of B, then in compound Y, 8 g of A will combine with _______ g of B.