How many grams of oxygen can be produced by heating 10.0g of mercury (II) oxide?

Sulfuric acid is added to 8.10g of magnesium, how many grams of hydrogen are set free?

I'll do the first. You do the second by following the first as a guide.
1. Write the balanced equation.
2HgO ==> 2Hg + O2

2. Convert what you have into mols.
mols = grams/molar mass
mols HgO= 10/216 = 0.0463

3. Using the coefficients in the balanced equation, convert mols of what you have (in this case mols HgO) to mols of what you want ( in this case O2).
mols O2 = mols HgO x (1 mol O2/2 mol HgO)=0.0463 x 1/2 = 0.02315

4. Now convert mols O2 to grams.
grams = mols x molar mass
grams = mols O2 x molar mass O2
grams = 0.02315 x 32 = ??

You will need to redo this problem because I estimated the molar mass of HgO as 216 but it is not quite that number (a bit higher). But you have the idea.
Remember this procedure. It will work many a stoichiometry problem for you.

To solve the second problem, we will follow a similar procedure as we did for the first problem.

1. Write the balanced equation:
Mg + H2SO4 --> MgSO4 + H2

2. Convert the given mass of magnesium into moles:
moles = mass / molar mass
moles Mg = 8.10g / 24.31 g/mol = 0.333 moles

3. Use the coefficients in the balanced equation to determine the mole ratio between magnesium and hydrogen:
1 mole of magnesium produces 1 mole of hydrogen

4. Convert moles of magnesium to moles of hydrogen:
moles H2 = moles Mg

5. Convert moles of hydrogen to grams:
grams = moles x molar mass
grams H2 = 0.333 moles x 2.02 g/mol = ?? (calculate the value)

Make sure to use the correct molar mass of magnesium and hydrogen when performing the calculations.

Remember, it is important to always balance the equation and correctly convert units using the mole ratios and molar masses to accurately solve stoichiometry problems.