Homologous and analogous structures answer different evolutionary questions. Homologous structures share a basic structural pattern and common ancestry, even when their functions differ. The pentadactyl limb in vertebrates has the same underlying arrangement of bones adapted for grasping, flight, running or swimming; it is evidence of divergent evolution.
Analogous structures have similar functions but different structural origins and ancestry. Bat wings and insect wings both support flight, but their underlying construction and evolutionary origins differ. They are evidence of convergent evolution: similar selection pressures produced similar functions independently. In an exam, compare structure and ancestry, not function alone.