How are birds and bat wings homologous as vertebrate forelimbs, but analogous as wings?
Homologous means that they actually evolved from the same origin, or like they have the same ancestor. So both bats and birds having some sort of forelimb comes from the same ancestor. However, bats and birds forelimbs as wings are not the same structurally and did not evolve from the same place. They just serve the same function, which is the definition of analogous structures.