Mg(s) as it is at the bottom of the cycle
No, it is not because it is at "the bottom of the cycle", standard states are defined:
https://en.wikipedia.org/wiki/Standard_stateBut yes, Mg(s) is the standard state. So, if the Mg(s) is a standard state, and the formation enthalpy is formation from standard state, which process - D or F - is the formation of MgX
2(s)?
Once you assign correctly enthalpy of the formation of MgX
2(s) to one of the processes in the cycle it will be obvious what is left to calculate - and it should be also obvious how to calculate it.