How can the Milky way and Andromeda galaxies be on a collision course when the Universe is expanding?
The Universe is expanding, though the effect is only very slight, and it is only noticed on very large distances. The gravitational attraction between the Milky Way and the Andromeda is stronger than the outward expansion of the Universe, so they will move toward each other. Hubble only observed that galaxies were moving away from each other *in general*. It is much the same concept as jumping in the air; even though most things on Earth move toward the center of gravity (down), some things go up.