Constructing a right triangle with a given hypotenuse segment and given point of tangency for its incircle 
Given a hypotenuse $AB$ and an arbitrary point $C$ on $AB$. How to construct a right triangle with the given hypotenuse $AB$ such that point $C$ is the point of tangency of the inscribed circle?




My attempt: First draw a circle with $AB$ as diameter (Thales theorem). if i get the incenter of the triangle then the rest is easy. but how to locate the point$G$ on the circle  or how to locate the incenter with the given information
. any hints or idea
here is my construction.
$F$ is the midpoint of $CD$
here]


Construction: Let $D$ be the midpoint of $AB$.Construct the point $E$ on the line $(AB)$ such that $BE=DC$. Construct congruent circles $\cal D$ and $\cal E$ with radii $DB=EC$ centered at $D$ and $E$, respectively. At point $B$ construct the perpendicular line to $AB$. Let its intersection with $\cal E$ be $F$. Connect $D$ and $F$. Let intersection of $DF$ with $\cal D$ be $G$. Draw a circle centered at $A$ with radius $AC+GF$. Its intersection with $\cal D$ will be the third triangle vertex $I$.
Explanation: the tangent points of the inscribed circle divide the triangle sides in such a way that
$$
a=y+z,\quad b=z+x,\quad c=x+y.
$$
The lengths $x=AC$ and $y=BC$ are given. To find $z$ we write:
$$
(y+z)^2+(z+x)^2-(x+y)^2=0\implies z=\sqrt{\left(\frac{x+y}2\right)^2+xy}-\frac{x+y}2.
$$
By the above construction it is the length of segment $GF$, since $DB=\frac{x+y}2, BF=\sqrt{xy}$.
