Good night!
Not so simple... but I think I've solved
Ellipse equation:
[tex]\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1[/tex]
Data:
[tex]a=\dfrac{Aw\cdot\left(1-P\right)}{2}[/tex]
[tex]b=\dfrac{Ah\cdot\left(1-P\right)}{2}[/tex]
Now you have
a and
b.
Given Bwa and Bha:
[tex]x=\dfrac{Bwa}{Bha}\cdot y[/tex]
Because of that, using this x in the Ellipse equation, we have y:
[tex]\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1[/tex]
Using x:
[tex]\dfrac{\left(\dfrac{Bwa}{Bha}\cdot y\right)^2}{a^2}+\dfrac{y^2}{b^2}=1[/tex]
Arranging:
[tex]\dfrac{\dfrac{Bwa^2}{Bha^2}}{a^2}\cdot y^2+\dfrac{y^2}{b^2}=1[/tex]
Preparing to isolate y:
[tex]y^2\cdot\left(\dfrac{\dfrac{Bwa^2}{Bha^2}}{a^2}+\dfrac{1}{b^2}\right)=1[/tex]
Isolate y:
[tex]y=\dfrac{1}{\sqrt{\dfrac{\dfrac{Bwa^2}{Bha^2}}{a^2}+\dfrac{1}{b^2}}}[/tex]
Now return to x:
[tex]x=\dfrac{Bwa}{Bha}\cdot\dfrac{1}{\sqrt{\dfrac{\dfrac{Bwa^2}{Bha^2}}{a^2}+\dfrac{1}{b^2}}}[/tex]
Finally:
[tex]Bwb=2x\\\\Bhb=2y[/tex]
I hope I have helped!