<s>[INST] Point is chosen inside the square, find angle. Inside the square $MNPK$ point $O$ in such a way that $MO:ON:OP =1:2:3$. Find $\angle MON$.
I tried to solve this problem with vectors, but I couldn't find coordinates of point $O$. Can someone explain this to me?
 [/INST] 
Apply the Pythagorean theorem to establish the system of three equations
\begin{align}
x^2+y^2=4,\>\>\>\>\> x^2+(a-y)^2=1,\>\>\>\>\> (a-x)^2+y^2=9 
\end{align}
The 2nd and 3rd equations lead to $y=\frac{a^2+3}{2a}$ and $x=\frac{a^2-5}{2a}$, respectively. Plug them into the 1st equation to get $a^4 - 10a^2 +17=0$, which yields $a^2 =5+2\sqrt2$. Then, use the cosine rule for the triangle OMN to obtain
$$\cos\angle MON = \frac{OM^2+ON^2-a^2}{2|OM||ON|} = \frac{1+4-(5+2\sqrt2)}{2\cdot 1\cdot2}=-\frac{\sqrt2}2$$
Thus, $\angle MON =135^\circ$.
</s>