The correct answer is:
A. They used to be free-living prokaryotes that functioned as unicellular organisms.
Mitochondria and chloroplasts are thought to have originated from free-living prokaryotic organisms that were engulfed by ancestral eukaryotic cells in a process known as endosymbiosis. This endosymbiotic theory explains why these organelles have their own DNA, which is similar to that of bacteria, and can replicate independently of the cell's nuclear DNA.