Answer:
A. 
Step-by-step explanation:
Ferns are a type of plant, therefore the way they obtain will be the same way as any other plant: by creating energy (ATP) during photosynthesis. 
Flatworms cannot create their own energy, they're not autotrophic. Therefore, they must obtain energy by digesting any food they may find. 
Hope it helped,
BiologiaMagister