Exercise
These are exercises in four-part harmony (soprano, alto, tenor and bass) in the style taught in Spanish conservatories. In a connection that keeps the common tone, any note that two consecutive chords share stays in the same voice, while the other voices move to the nearest chord tone. This gives smooth voice leading and avoids parallel fifths and octaves.
Harmonize the following bass lines, connecting the chords by keeping the common tone, and name the key wherever it can be determined. These lines are longer and move through more keys (key signatures of up to four flats), in common time, cut time, 3/4 and 2/4.
The small figure under the first bass note tells you which chord tone the soprano starts on: 8 means the octave of the bass (the root) and 3 means the third above it.

Audio
Proposed solution
Below is one possible solution. In harmony there is no single correct answer: other voicings that follow the rules are just as valid. The bass is shown in blue.

Audio
Next exercise
To keep moving forward in your harmony studies, try the next exercise: Harmony exercise 5a, connections without a common tone.