I would like to know how to find $a$ and $b$ of an ellipse if I know $K$, $L$ and $m$ as shown in the figure .
I can find the answer to this using the equations below and an Excel Goal Seek or Python but I'd be interested to see how to solve this directly. I get stuck trying to simplify the simultaneous equations.
$$ \frac{x^2}{a^2}+\frac{y^2}{b^2}=1\\ \\ \frac{L^2}{a^2}+\frac{(-b+K)^2}{b^2}=1\quad(1)\\ \\ \\ \\ y= mx\pm \sqrt{a^2m^2+b^2}\\ \\ -b+K=mL\pm\sqrt{a^2m^2+b^2}\;\;\;\;(2)\\ $$
Rearranging $(1)$ $$ a=\sqrt{\frac{L^2}{1-\frac{(-b+K)^2}{b^2}}} $$
Thanks in Advance!

