The #"moles"# specifies a NUMBER only....#"one mole"# of stuff, specifies #6.022xx10^23# individual items of that stuff. And so we look at the Periodic Table and interrogate the masses associated with the given numbers...
#(A)" "1.2*mol*Mg-=1.2*molxx24.31*g*mol^-1-=29.17*g#
#(B)" "6.022xx10^21*C*"atoms"-=(6.022xx10^21*C*"atoms")/(6.022xx10^23*C*"atoms"*mol^-1)xx12.011*g*mol^-1-=0.120*g#
#(C)# #0.1*molxxunderbrace(31.00*g*mol^-1)_"molar mass of P"=3.1*g.#
#(D)" "(6.022xx10^21*"sodium atoms")/(6.022xx10^23*"sodium atoms"*mol^-1)xxunderbrace(22.99*g*mol^-1)_"molar mass of Na"=0.230*g.#
And thus your choice is pretty clear. And the knowledge that I needed for this questions was #(i)# the #"Avocado number"#, #6.022xx10^23*mol^-1#, and #(ii)#, the molar masses of the given elements.