There is no logic in your statement and you have misinterpreted the theory of Karma. From the point of logic, what is it that makes you assume that C's action are the result of A's actions on B? Simply saying karma is not logical. Your example is lacking in logic. Second, the Lord is the giver of karma. The Brahma Sutras 3.2.38-39 and Sankara's commentary says (Swami Vireswarananda translator, available here - https://www.wisdomlib.org/hinduism/book/brahma-sutras/d/doc62753.html):
From Him (the Lord) are the fruits of actions; for that is reasonable.
Having described the nature of Brahman, the author proceeds now to discuss the view of Mimamsakas, who say that Karma (work) and not Isvara, gives the fruits of one's actions. According to them it is useless to set up Iswara for this purpose, since Karma itself can give the result at a future time.
This Sutra refutes it and says that from Iswara alone come the fruits of one's work. Karma is insentient and short-lived, and cannot therefore be expected to bestow the fruits of actions at a future time according to one's deserts. We do not see any insentient thing bestow fruits on those who worship it. Therefore it is only from the Lord, who is worshiped through actions, that their results proceed.
And because the scriptures so teaches.
The scripture declares that the fruits of actions come from the Lord. "That great, birthless Self is the eater of food and the giver of wealth (the fruits of one's work)" (Brhadaranyaka Upanisihad 4.4.24)
And Sankara's commentary on this verse (Brhadaranyaka Upanishad, Swami Madhavananda translator):
...and the giver of wealth, i.e. the fruits of the actions of all, in other words, he connects all beings with the results of their respective actions...
The Lord is the giver of the fruits of karma. No one can say that any action is directly the cause of a previous action.