Nitrogen atomic# 7 7protons, 7electrons, 7 neutrons
Oxygen atomic# 8 8protons, 8electrons, 8neutrons
Phosphorous atomic# 15 15protons, 15 electrons, 15 neutrons
Sulfur atomic#16 16protons, 16electrons, 16 neutrons
The first molecule is a sensible molecule having complete octet of each atom such as C, H and O whereas the second molecule having hydrogen present between the aldehyde and methyl group and thus showing hydrogen is making bond with aldehyde and methyl as well which is not possible because hydrogen only having one electron in its octet due to which it can only form a single bond by sharing its valence electron.