The length limit on eNotes responses prevents me from answering all of your questions. It's best for you if you limit the number of questions you include in a single post.
#3. This question is worded strangely, it seems like some important specifications are being left out. Nevertheless, the main function of lungs is to provide a means of getting oxygen into the blood. Lungs are not necessary to do this; there are plenty of creatures that acquire oxygen without breathing. The advantage of lungs is that they provide a large surface area with which the blood can more closely interact with, and uptake, the oxygen molecules, as compared to the exterior regions of the body or the digestive tract itself.
Because oxygen is necessary for cell respiration, we may assume that lungs evolved after the digestive tract, since it would be possible to acquire food AND oxygen directly through the digestive lining. Lungs became necessary both in order to increase the amount of oxygen available to a more active organism, and in order to replace the function of gills when animals moved onto land.
#5. Fruits serve two functions. Like other seed-dispersal mechanisms, such as nuts, they contain some of the nutrients necessary for the seeds within them to establish themselves once detached from their parent, but before they are capable of self-sustained growth. However, the more significant function of fruit is to enhance seed dispersal itself. By making fruits appealing to animals via their bright color and sweet taste, the fruit serves as a lure, encouraging an animal to eat it and then, at least hypothetically, the animal will defecate the seeds much farther from the parent plant than the seed would have been able to travel via gravity alone.
It should be noted that many fruits we are accustomed to are the product of hundreds of years of agricultural engineering, and the "real" fruit is often significantly smaller and less impressive than its grocery store counterpart.
#7. CO2 is produced as a waste product during cellular respiration, and released as a gas. A variety of enzymes catalyze the conversion of CO2 and other intermediary products into glucose (C6H12O6) although glucose is often given as an example of the general class of carbohydrates produced via these reactions, and is not the sole possible product. Also, the final part of this question poses a false correlation; the oxygen gas produced via photosynthesis does not come from CO2, but from H2O. This was confirmed via isotopic studies that traced the source atoms from introduction to product.