Find the value of a, if the distance between the points A (–3, –14) and B (a, –5) is 9 units.