<s>[INST] Point within the interior of a given angle The point $M$ is within the interior of given angle $\alpha$. Find the distance between $M$ and the vertex of the angle ($OM=?$) if $a$ and $b$ are the distances from $M$ to the sides of the angle.

We can see that $$OM^2=OP^2+PM^2=OK^2+KM^2$$
Let $OP=x;PK=y$. Then $$2OM^2=OP^2+PM^2+OK^2+KM^2\\=x^2+b^2+y^2+a^2.$$ I can't approach the problem further. How can we use the given angle $\alpha$? Thank you in advance!
 [/INST] Let $d=OM$
$$ \arcsin(a/d)+ \arcsin(b/d) = \alpha$$
$$ a \sqrt{d^2-b^2} + b \sqrt{d^2-a^2} = d^2\sin \alpha$$
Let Mathematica solve fourth order equation for $d$
$$sal= \sin \alpha$$
{d -> 0.5` Sqrt[(4.` (1.` + 1.` b^2))/sal^2 + 
    2.` Sqrt[(4.` (1.` + 1.` b^2)^2)/sal^4 - (
      16.` (0.25` - 0.5` b^2 + 0.25` b^4 + 1.` b^2 sal^2))/sal^4]]}

</s>