According to the law of conservation of mass - lavoisier's law - in a closed container, the sum of the masses of the reactants is equal to the sum of the masses of the products. So, if you have:
A + B ----> C (larger compound) and if it is in a closed container you will have the sum of mass of A and B.
So in this case:
mass of A = 14 g
mass of B = 32 g
14 + 32 = 46 g
So the mass of the product produced will be 46 g.