# How to solve this equation

I am wondering if it is possible to solve an equation like this

(a+bi)/(-a+bi)=c+di

for a and b assuming that I know c and d

essentially c and d are just the real and imaginary components of a complex number

a and b are the real and imaginary components of a different complex number

the denominator on the left hand side is the opposite of the complex conjugate

for example if I know a and b

(4+2*1i)/(-4+2*1i) then I can solve for c and d easily be just doing division = -0.6000 - 0.8000i

I am not sure how to go in the opposite direction though, as in I know c and d, how to get a and b? Let me know if anyone has any thoughts thanks.

$$\frac{a+bi}{-a+bi}\frac{(-a-bi)}{(-a-bi)}=\frac{-(a+bi)^{2}}{a^{2}+b^{2}}$$
$$\frac{-a^{2}+b^{2}}{a^{2}+b^{2}}=c$$
$$\frac{-2ab}{a^{2}+b^{2}}=d$$