given an angle $\angle (h,k)$, where $h,k$ are the legs of the angle. Let $P$ be some point in the interior of the angle.
I want to construct a circle through P which is tangent to both legs $h,k$.
First I drew the angle bisector, for the center of the circle must lie on it in order to be tangent to $h,k$. But I could not accomplish to find the origin on the angle bisector. Can someone help me please?
Best wishes

Let your angle $\angle (h,k)$ be given as angle $\angle BAC$ in this diagram, with $h=\overrightarrow {AB}$ and $k=\overrightarrow {AC}$.
Draw the ray $\overrightarrow{AP}$. Place any point $D$ on the bisector of $\angle (h,k)$ and draw the circle centered at $D$ tangent to both rays $h$ and $k$. Let the intersections of circle $D$ with ray $\overrightarrow{AP}$ be points $F$ and $G$.
Draw segments $\overline{DF}$ and $\overline{DG}$. Place points $H$ and $I$ on ray $\overrightarrow{AD}$ such that segment $\overline{PH}$ is parallel to segment $\overline{DF}$ and segment $\overline{PI}$ is parallel to segment $\overline{DG}$. Draw a circle with center $H$ and radius $HP$ as well as a circle with center $I$ and radius $IP$.
Then circles $H$ and $I$ will be tangent to rays $h$ and $k$ and will be your desired circles.
This construction works because the figure of circle $D$ with point $F$ is similar to circle $H$ with point $P$, and also the figure of circle $D$ with point $G$ is similar to circle $I$ with point $P$. In other words, we made a "trial" circle first at $D$ then expanded it with the correct proportions to the circles we wanted.