But a bats wing is both homologous and analogous to a birds wing? They have homologous bones but the wings are analogous.
No, they're homologous structures (pentadactyl limb). A bird's wing would be analogous to a fly's wing.
katiesaliba is sort of** correct; here's a bit of an elaboration.
A bat's wing looks like this:
While a bird's wing looks like this:
Can you tell an important difference between the two?
Spoiler
It's that with the bat's wing there are 5 digits (akin to fingers - pentadactyly). Bird wings usually only demonstrate three digital bones (tridactyly).
From that, we can infer that although both structures are involved in the same general function (flight), they are quite clearly anatomically and structurally distinct. There are several other ways of understanding this, such as presence/absence of feathers between the two animals.
Because function is roughly the same but other characteristics are not, we can say that the structures are
analogous**.
**Edit: There is a bit of misunderstanding surrounding this concept. The flight structures of a bird and a bat are analogous (similar function, different structure), but their forelimbs are homologous (different function, similar structure). The wings are NOT the same as forelimbs; the assumption that they are the same is where the confusion arises.
Any question you see on the exam will state the specific structure they're after.