<s>[INST] Length of two sides in a quadrilateral with given angles I'm stuck finding the length of two sides in a quadrilateral for which I know all angles and the length of two sides.

All red objects are know ($a,b,\alpha,\beta,\gamma $  and $\delta$). I need to find the length of $c$ and $d$. I know it can't be too difficult but I can't figure it out atm. Thanks for your help!
 [/INST] Suppose our quadrilateral has vertices $A,B,C,D$. We can deduce the length of $BD$ using the law of cosines (Ignore the labels):

We get that
$$BD^2 = a^2 + b^2 - 2ab \cos \alpha$$.
Next, we find the angles $\angle ABD$ and $\angle ADB$ using law of sines to get:
$$m\angle ADB = \sin^{-1}\left(\frac{a \sin\alpha}{\sqrt{a^2+b^2-2ab\cos\alpha}}\right)$$
$$m\angle ABD = \sin^{-1}\left(\frac{b \sin\alpha}{\sqrt{a^2+b^2-2ab\cos\alpha}}\right)$$
Next, we deduce the measures of angles $\angle CBD$ and $\angle CDB$ using angle addition. We get
$$m\angle CBD = \beta-\sin^{-1}\left(\frac{a \sin\alpha}{\sqrt{a^2+b^2-2ab\cos\alpha}}\right)$$
$$m\angle CBD = \alpha-\sin^{-1}\left(\frac{b \sin\alpha}{\sqrt{a^2+b^2-2ab\cos\alpha}}\right)$$
Finally, use law of sines one last time to get:
$$c = \frac{\sin\left(\beta-\sin^{-1}\left(\frac{a \sin\alpha}{\sqrt{a^2+b^2-2ab\cos\alpha}}\right)\right) \sqrt{a^2+b^2-2ab\cos\alpha}}{\sin \gamma}$$
$$d = \frac{\sin\left(\alpha-\sin^{-1}\left(\frac{b \sin\alpha}{\sqrt{a^2+b^2-2ab\cos\alpha}}\right)\right) \sqrt{a^2+b^2-2ab\cos\alpha}}{\sin \gamma}$$
I may have made a mistake, someone please point it out if you find one. The general gist however, is the same. Law of cosines to find $BD$, law of sines to get the angles of triangle $BDC$, then law of sines again to get the measures of the sides of the triangle.
</s>