Your data are not in a reproducible format, so I haven't tried this, but it takes a slightly different approach than IShouldBUyABoat by just enforcing a 7-digit rule to identify numbers:
sapply(regmatches(b_i,regexpr("[[:digit:]]{7}", b_i)),
function(x) a_i[grepl(x, a_i)])