$ \triangle ABC$ is a right triangle, $AX$ bisects $\angle A$ and ... Assume $ \triangle ABC$ is a right triangle where $\angle C= 90°$. Suppose that
$ \overline {AX} $ bisects $\angle A$ and point $X$ lies on $BC$. Assume that the circumcircle of triangle $AXB$ intersects $AC$ on $Y$.
a) Show that if lengths $BC$ and $CY$ are intergers divisible by a prime $p$, then $AY$ is also an intenger divisible by $p$.
b) Show that if $CY= k$ and $BC= 3k$ ($k$ is an interger), then the lengths of sides of the triangle $ABC$ must be intergers.
This is what I have done:
Aplying power of point of $C$, we get:
$$CY (CA) = (CX)(CB)$$ 
$$CY(CY+AY)= CB(CB -XB)$$
$$ (CY)^2+ CY(AY) = (CB)^2 - CB(XB)$$ 
$$CY(AY) = (CB)^2 - (CY)^2 - CB(XB)$$ 
$$ AY = \frac{(CB)^2 - (CY)^2 - CB(XB)}{CY}$$ 
But this doesn't prove that $AY$ is divisible by $p$ or that it is an interger. 

I did that considering this figure. I think I may be wrong because that might not be what a circumcircle is.
 A: Since $\angle BAX = \angle XAY$ and $BXYA$ are concyclic, it means that $BX=XY$. Thus
$$
CX = BC - BX \land CX^2 = BX^2 - CY^2
$$
$$
(BC - BX)^2 = BX^2 - CY^2
$$
$$
BC^2 + BX^2 - 2BC\cdot BX = BX^2 - CY^2
$$
$$
BX = \frac{BC^2+CY^2}{2BC}
$$
From the power of the point:
$$
AC = \frac{BC\cdot BX}{CY} = \frac{BC^2 +CY^2}{2CY}
$$
Why is it divisible by $p$?
A: Hint: Join the points $B$ and $Y$. Then study the triangles $BCY$ and $ACX$, which are similar. If we let $CB=m=pa, CY=n=pb, AY=M, CX=N$, then by we have that $$\frac{BC}{AC}=\frac{CY}{CX}=\frac{BY}{AX}.$$ From there you get two equations in the unknowns $M$ and $N$, which we can solve for $M$, which should tell us what we seek.
For the second part, we now know the sides of $\triangle ABC$, we can study them (after making appropriate substitutions) to see how they are integers given the constraints.
A: You might find it useful:
The power of point equation you wrote is correct.
$CY⋅CA=CX⋅CB$
Also, according to the internal bisector theorem:
$\frac{CX}{CA}=\frac{BX}{AB}$
