Basically, 2 grams of element X are needed to combine with 4 grams of element Y is order to produce the desired compound.
This means that the ratio between X and Y is 1:2.
Based on this, the amount of Y needed to combine with 42 grams of X is as follows:
amount of Y = 42 x (2/1) = 84 grams