M(NaHCO3) = 23 + 1 + 12 + 16*3 = 84 г/моль
ω(Na) = 23/84 * 100% = 27,38%
ω(H) = 1/84 * 100% = 1,2%
ω(C) = 12/84 * 100% = 14,28%
ω(O) = 16*3/84 * 100% = 57,14%
M(Mg(OH)2) = 24 + (16 + 1)*2 = 58 г/моль
ω(Mg) = 24/58 * 100% = 41,38%
ω(O) = 2*16/58 * 100% = 55,17%
ω(H) = 2*1/58 * 100% = 3,45%