Hydrogen cyanide is produced industrially from the reaction of gaseous ammonia, oxygen and methane:

2NH3(g) + 3O2(g) + 2CH4 -->2HCN + 6H2O(g)
a)If 5.00 x 10^3 kg each of NH3 , O2, and CH4 are reacted what mass of HCN will be produced, assuming 100% yield?
b)At the end of the reaction what are the masses of each of the reactants;NH3, O2, CH4

I got how to do part a) but i don't know how to do part B)

Part B is done the same way as part A; just do it three times.

Part B.
I assume from your post that you have the correct value for moles HCN.
Using the coerfficients in the balanced equation, convert moles HCN to
a. moles NH3.
b. moles O2.
c. moles CH4.

Now convert each of the a,b,c to grams. g = moles x molar mass.

Then subtract the amount you started with (5.00 kg of each) - the amount used in a,b, c above. the remainder is what is left after the reaction. One of those will be zero. Perhaps two can be zero. Probably all three are not zero.

To calculate the masses of each reactant at the end of the reaction, we need to use stoichiometry and compare the moles of reactants initially present to the moles used in the reaction. Here's how you can solve part b):

Step 1: Convert the given mass of each reactant to moles using their respective molar masses.

The molar mass of NH3 (ammonia) is 17.03 g/mol.
The molar mass of O2 (oxygen) is 32.00 g/mol.
The molar mass of CH4 (methane) is 16.04 g/mol.

To convert the mass of each reactant to moles, divide the given mass by its molar mass:

Number of moles of NH3 = mass of NH3 / molar mass of NH3
Number of moles of O2 = mass of O2 / molar mass of O2
Number of moles of CH4 = mass of CH4 / molar mass of CH4

Step 2: Use the stoichiometric coefficients from the balanced equation to determine the number of moles of each reactant used in the reaction.

From the balanced equation:
2NH3(g) + 3O2(g) + 2CH4 --> 2HCN + 6H2O(g)

We can see that the ratio of NH3 to O2 to CH4 is 2:3:2.

Number of moles of NH3 used = (Number of moles of NH3 initially) x (3 moles of O2 / 2 moles of NH3)
Number of moles of O2 used = (Number of moles of O2 initially) x (3 moles of O2 / 2 moles of NH3)
Number of moles of CH4 used = (Number of moles of CH4 initially) x (3 moles of O2 / 2 moles of NH3)

Step 3: Calculate the masses of each reactant remaining at the end of the reaction.

Mass of NH3 remaining = (Number of moles of NH3 initially - Number of moles of NH3 used) x molar mass of NH3
Mass of O2 remaining = (Number of moles of O2 initially - Number of moles of O2 used) x molar mass of O2
Mass of CH4 remaining = (Number of moles of CH4 initially - Number of moles of CH4 used) x molar mass of CH4

By following these steps, you can determine the masses of NH3, O2, and CH4 remaining at the end of the reaction.

so is this correct:

3330000 grams CH4
0 grams O2
1770833 grams NH3