Worked solution from the Atomic structure MCQ booklet.
The left graph jumps hugely between the 7th and 8th electron. That means 7 outer electrons: Group 17, so chlorine in Period 3.
The right graph jumps between the 2nd and 3rd electron. That means 2 outer electrons: Group 2, so magnesium in Period 3.
The ionic compound is MgCl2.
So the answer is A.
B and D use Period 4 elements (Ca, Br, K, Se), but the graphs are for Period 3. C Na2S needs a Group 1 element, which would jump after the 1st electron.
▶ Starts at Q3 (5:52)
Starts at Q3 (5:52) · by CheMuneeb. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.