The equivalent weight of an element is calculated by dividing the molecular weight of the element by its valency. In this case, the molecular weight of the element is given as 12 g, and it reacts with 32 g of oxygen, which has a molecular weight of 32 g. The equivalent weight is:
\[
\text{Equivalent weight} = \frac{\text{Molecular weight of element}}{\text{Valency}} = \frac{12}{4} = 3
\]