The only "challenging part" is deciding if you want to try to write it as a single equation. It is simpler to write each statement as an equation.
Let A, B, and C represent the number of sweets Amanda, Beatrice, and Christina had, respectively.
"m sweets were shared among Amanda, Beatrice, and Chrisina." A+ B+ C= m
"Beatrice has h/2 times as many sweets as Christina." B= (h/2)C
"Amanda's share is g times Beatrice's share." A= gB
Since B= (h/1)C, A= g(h/2)C= (gh/2)C. So we can write B= A/g and C= 2A/gh.
Putting those into the first equation A+ A/g+ 2A/gh= (1+ g+ 2/gh)A= m.
Can you solve that for A?