For an animated gif of this, click Here. Click Here for an animation showing a more eliptical (flattened) orbit.
The two stars orbit the center of mass, star A travels a small circle, and thus its velocity changes little. Star B travels a much bigger circle in the same amount of time! Its velocity changes quickly: either RED-shifted or BLUE-shifted.
Which star, A or B, is more massive in this system?
What would happen if we were looking down on the stars, such that all their motion is perpendicular to our direction? (the inclination of the orbit is important!)
What would happen if one of the stars was MUCH dimmer than its companion? How would we see the spectrum change? (These are called single-lined spectroscopic binaries).