The first step to solving a problem like this is to create a simple example of it. Right now, I'm not sure I completely understand what you mean. Can you make a simple example of this kind of problem and show what code you would use for it?
The answer of course is to substitute actual values into the equations and then get sufficient algebraic formulas relating C1 and C2 to solve for their values. But without a concrete example, it's hard to communicate anything concrete.