The correct option is B O2
Two or more molecular entities are described as isoelectronic if they have the same number of valence electrons and the same structure, i.e. number and connectivity of atoms, but differ in some of the elements involved.
CO has total 14 electrons ( carbon has 6 electrons+ oxygen has 8 electrons).
NO+ has total 14 electrons ( Nitrogen has 7 electrons+ oxygen has 7 electrons).
CN− has total 14 electrons ( carbon has 6 electrons+ nitrogen has 8 electrons).
In the case of O2, it has 16 electrons (2 atoms of oxygen 8+8)
conclusion: Hence O2 is not isoelectronic with other three.