I am limited with Livecycle but I am going to try to help you as best I can. This solution may be helpful.
For field A you will need a script. JavaScript. On the change event. It should be similar to the one below.
(
if
Text.Field.A.rawValue == 4
then
Text.FIeld.B.rawValue == 17
elseif
Text.Field.A.rawValue == 5
then
Text.Field.B.rawValue ==21
endif
This code should get you on the right track. You can repeat sections of this code to allow for more bindings. Please forgive any scripting mistakes. As I said, this is only meant to help get you on the right track.