Let $AB$ the hypotenuse, let vector $\vec c=\overrightarrow{OB}-\overrightarrow{OA}$, its length $c$, the right angle at $C$, $DC=h$ the height of the triangle, $a$ and $b$ the given length of the legs, $q$ length of $AD$ as usual. Define $J\colon R^2\rightarrow R^2$, $(v_1,v_2)\mapsto (-v_2,v_1)$ the rotation by 90 degree.
We know by Euclid that $q=b^2/c$ and elementarily that $ab=ch$, so $h=ab/c$. Then $\vec c/c$ is the unit vector of $c$, thus one solution is
$$\overrightarrow{OC}=\overrightarrow{OA}+\frac{b^2}{c}\frac{\vec c}{c}+\frac{ab}{c}J\Bigl(\frac{\vec c}{c}\Bigr)=\overrightarrow{OA}+\frac{b}{c^2}\bigl(b\vec c+ aJ(\vec c)\big).$$
Can you find the second solution?
Moral: Avoid coordinates!
Michael