's suggestion of creating a sed interpreter script is probably the definitive solution. Another possibility is to loop over all line entries in b.txt
while read from to; do
echo sed -i s/$from/$to/g a.txt
done < b.txt
This only works if the substitution text contains no whitespace. It is left as an exercise to the reader to make the script actually work on real data files. Test on backup data first.