Step 1 - Understanding percentual concentration
To express the concentration of a substance as a percentual concentration, we just need to divide its mass by the total mass:

Step 2 - Calculating the concentration in the pill
We want to calculate the concentration of Mg in the pill. Therefore, we'll divide its mass by the total mass of the pill:

Answer: the concentration of Mg in the pill is 6.8%