The correct option is D
2 and 3
For elements having valence electrons 1,2 or 3 . Valency is equal to the number of valence electrons.
Number of valence electrons in aluminum is 3, valency = 3.
For elements having valence electrons 4,5,6 or 7. Valency = 8 - number of valence electrons.
Number of valence electrons in oxygen is 6, valency = 8-6 =2.