I would like to have a formula to calculate the $x,y$ coordinates of a point "$B_2$" on the hypotenuse of a right triangle, given the angles "$b$" and "$a$" or the length of line $A-B_2$: see the triangle diagram here.
From this similar question, I have been able to calculate this point when the opposite and adjacent legs are equal, by using the formula $$ x = \frac{\sin(a)}{ \dfrac{\sin(135-a) }{ y}}=\frac{y\sin(a)}{ \sin(135-a) } $$
However, I also want to find this point when both "$a$" and "$b$" angles vary in the range of $0°$ to $90°$, and I have not been able to figure out how to change this formula to accommodate two varying angles.
Please help!
Edit: The main goal is to be able to use the coordinates of B2 to locate geometry, i.e. drawing a line from C to B2, or a polygon or ellipse centered at B2, and the way I want to control where B2 is located on the hypotenuse is by changing angles b, and a. If I have to calculate the location of point B2 by locating it at a distance x from A with sin/cos, that’s okay also.

If the coordinates of $\text{A}$ and $\text{B}$ are $\ x_A, y_A\ $ and $\ x_B, y_B\ $ respectively, then those of $\text{B2}$ will be $\ \frac{x_A\cot b + x_B\tan a }{\cot b+ \tan a}, \frac{y_A\cot b + y_B\tan a }{\cot b+ \tan a}\ $.
To see this, drop a perpendicular from $\text{B2}$ to $\text{BC}$ to intersect it at $\text{D}$. Then $\ \lvert \text{BD}\rvert=\lvert \text{B2D}\rvert\cot b\ $, $\ \lvert \text{CD}\rvert=\lvert \text{B2D}\rvert\cot\left(\frac{\pi}{2}-a\right)=\lvert \text{B2D}\rvert\tan a\ $, so from the similarity of triangles $\text{B2BD}$ and $\text{ABC}$, we get $\ \frac{\lvert \text{BD}\rvert}{\lvert \text{BC}\rvert}=\frac{\cot b }{\cot b+ \tan a}=\frac{\lvert \text{BB2}\rvert}{\lvert \text{BA}\rvert}=\frac{x_B-x}{x_B-x_A}=\frac{y_B-y}{y_B-y_A}\ $, where $\ x,y\ $ are the coordinates of $\text{B2}$. The expressions given above for $\ x\ $ and $\ y\ $ therefore follow.