This isn't an in-depth or decisive breakdown on what occurs, but here goes:
It's pretty well accepted that Drosophila eat yeast and metabolized sugars in the media, and pass the media through their system to take these in. Therefore, anything in your media that is small enough will pass through a larvae's system.
Potato flakes: acts as a source of complex carbs to be broken down into simple carbs by yeast (energy source). Also acts as a binder so that the media sticks to the bottom of the cup when feeding.
Sugar: starter source of simple sugars for yeast . . . boosts growth rate on the front end because no bottlenecking of energy source . . . simple sugar already in usable form for energy.
Brewer's yeast: This is an active form of yeast that also contains several essential amino acids. So, it acts as a yeast source and a protein source (of course, all yeasts act as a protein source to some extent).
Baker's yeast: Another active yeast source, also acts to break down media and provide food source to flies. By using two yeast species, you have a better protein spectrum for the flies and have differing colonies which can continue to reproduce under varying environmental conditions.
Water/Vinegar: Of course, you need water to allow the various creatures to respire and undergo hydrolysis of the complex carbs, etc. Vinegar (aka acetic acid) acts to reduce the pH of the media to inhibit mold growth.
-----
Homer W. Faucett III, esq.
Purveyor of Trivialities and Fine Nonsense