In some situations both the source and the observer move. We can write out a general Doppler equation for the observed frequency by simply combining the previous results.
The general equation accounting for any motion is:
f/ = f (v +/- vO) / (v -/+ vs )
For both sets of signs use the first sign when the motion is toward the other thing, and the second sign when the motion is away.