I'm trying to solve the following equation for parameters $A$ and $B$ in terms of $C_1$ and $C_2$. Is this possible at all?
I am not aware of any analytical method to solve this problem.
$$C_1 \cos(\omega t)+C_2 \cos(2\omega t)=A \cos(\omega t +\frac{\pi}{4}) + B \cos(2\omega t +\frac{\pi}{4})$$
I have $C_1$ and $C_2$. I want to solve for $B$ and $A$ in terms of $C_1$ and $C_2$. As you can see, the right-hand side just has extra $\frac{\pi}{4}$ phase to both terms.
It's not possible in general. COnsider the case $C_1 = 1, C_2 = 0, \omega = 1$. Then you need to write $$ \cos t = A \cos(t + \pi/4) + B \cos(2t + \pi / 4) $$ The left-hand side has no frequency $2t$ stuff, so $B$ has to be zero (this requires a little proof, but not much). But that leaves you with $$ \cos t = A \cos(t + \pi/4). $$ There's no value of $A$ that makes this true, as you can see by evaluating at $t = \pi/4, 3\pi/4$.