For the purpose of the discussion, it does not matter that state A and C are distinct. They can be treated as one and the same entity.
Therefore, what the question comes down to is whether a state has the right to try to recapture part of its territory occupied by another state. The answer to that question is that in international law (IL) there is indeed such a right.
IL is based on the idea that every state is like an individual. Every such state has the right to territorial integrity which means that another state may not occupy parts of its territory. This principle is enshrined in article 2(4) of the UN Charter.
All Members shall refrain in their international relations from the threat or use of force against the territorial integrity or political independence of any state, or in any other manner inconsistent with the Purposes of the United Nations.
This principle is essentially analoguous to the right to personal integrity found in most domestic law systems; you have the right not to get punched in the face. But naturally, if you are punched in the face you have the right to defend yourself and even punch back. IL contains the same right to self-defense. enshrined in article 51 of the UN Charter:
Nothing in the present Charter shall impair the inherent right of individual or collective self-defense if an armed attack occurs against a Member of the United Nations.
In The Case for Palestine Quigley writes:
But if a state recaptures its own territory by force, "this is not an employment of force contrary to the provisions of Article 2(4) of the charter," argued R. Y. Jennings in reply. "It cannot be force used against the territorial integrity or political independence of another State because the actor State is merely occupying its own territory." Jennings relied on the UN Charter definition of aggression as force used against the territorial integrity or political independence of a state. When Egypt and Syria attacked Israel in October 1973 to recover the Sinai Peninsula and Golan Heights, which Israel took from them in 1967, the Security Council did not condemn them.
In principle, Syria and its allies has the right to retake occupied territory. However, the aggression has to be conducted in a way that is consistent with IL and other obligations the parties to the conflict have taken upon themselves.