Problem with the logic of karma
Person A has unwholesome kamma, so unwholesome kamma make him get immorality resultant. Person A's kamma never force person B  to do unwholesome kamma to person A.

person A can get immorality resultant from anyway such as back pain himself, no one pain him. So although if person B pain person A: there is just person A's kamma give immorality resultant to person A, not to person B. And there is just person B's kamma give immorality resultant to person B, not to person A.

Kamma give immorality/morality resultant to it's person. Kamma will not give immorality/morality resultant to the others.

There are the other causes by person A (except kamm-cause) that let's person B do kamma to person A. But person B get those other causes because of person B's kamma. There is still not person A' kamma give resultant to person B to let him meet person A and get those other causes work.

See kamma-paccaya and vipākapaccaya in paṭṭhāna. Learn abhidhamma to get the easiest way to understand tipitaka.