The correct option is D Al,Na,Mg,Ca
The electrolysis methods are used for the extraction of highly reactive metals from their ores. K,Al,Na,Mg,Ca are obtained by electrolysis of their salts as they have more affinity for oxygen than carbon. Hence, Option D is correct.