They are homologous because they are both mouth parts performing different tasks.
The mouth parts of an adult horsefly are modified for biting. The mouth parts of a mosquito are modified for piercing skin and extracting blood.
Homologous structures are derived from a common ancestor or same evolutionary or developmental origin. Analogous structures on the other hand, are from different species that do not share a common ancestor.
For example, the fins of fish and flippers of whales (mammals) are analogous structures. These animals use them for swimming. However, they are evolutionary not related in a way that they do not share a common ancestor.
Are you having a hard time with biology? Learn how to study biology easily with these study tips and techniques from Goconqr.com.