You need to calculate new coordinates for text - > add transform_calculate and divide a bar height by 2, that way labels will be in the middle of your bars.
bar_chart = alt.Chart(source, title='Number of Carriers by Year and A/P Term(s)').mark_bar().encode(
alt.X('a:O', title='Delivery Year'),
alt.Y('b:Q', title='Number of Carriers', stack='zero'),
alt.Color('a:N', title='Carrier Terms')
)
bar_text = alt.Chart(source).mark_text(align='center',baseline='line-top',color='white').transform_calculate(
text_mid = '(datum.b/2)').encode(
x=alt.X('a:O'),
y=alt.Y('text_mid:Q', stack='zero'),
#detail='TERMS:N',
text=alt.Text('b:Q', format='d')
)