A parallel line through the incenter of a triangle The circumcircle of $\triangle ABC$ is $k(O;R).$ Through the incenter of the triangle is drawn a line $p$ parallel to $AC$ that intersects the circle $k$ at $M$ and $N.$ The side $AB=30$ divides the chord $MN$ into two segments with lengths $8$ and $25.$ Find the sides of $\triangle ABC.$ 

 $27$ $cm$ and $28.5$ $cm$


By the intersecting chord theorem, we have $AP\cdot PB=MP\cdot PN.$ Let $AP=x.$ Therefore, $x(30-x)=200 \iff x_{1,2}=10,20.$ So what from here? How to approach the problem further? Thank you in advance!
 A: 
To solve this problem we need to draw two auxiliary lines, i.e. the angle bisectors of $\measuredangle A$ and $\measuredangle C$ as shown in the diagram. Both these lines passes through the incenter $I$ of the triangle $ABC$. By the way, $Q$ is the intersection point of side $BC$ and line $MN$, which is parallel to the side $CA$. Consequently, we can state that the two triangles $API$ and $CIQ$ are isosceles triangles. 
It is given $AB=30$, $MP=8$, and $PN=25$. Let $AP=x$, $CA=3y$, and $CQ=z$.
You have already found one of the equations we need to solve the problem, i.e. 
$$30x-x^2=200 \tag{1}$$
Equation (1) has two roots, i.e. $x=10$ and $x=20$. First, we take the former and check whether it leads us to a solution. So, from now on, we have $AP=x=10$, which makes $PB=20$. As consequence, we have $AP:PB=1:2$. Since $PQ$ is parallel to $CA$, $CQ:QB=1:2$ as well.
Since $API$ is an isosceles triangle, we have $IP=AP=10$. In a similar vein, since $CIQ$ is an isosceles triangle, we can deduce $IQ=CQ=z$. Since the two lines $AC$ and $PQ$ are parallel to each other and $AP:PB=1:2$, we can write
$PQ=2y$. Therefore, we are able to form the following equation.
$$PQ=PI+IQ \qquad\rightarrow\qquad 2y=10+z \tag{2}$$
Now, intersecting chord theorem can be used to obtain the following equation.
$$MQ\cdot QN=\left(MP+PQ\right)\left(PN-PQ\right)=CQ\cdot QB \quad\rightarrow\quad  \left(8+2y\right)\left(25-2y\right)=z\cdot 2z $$
$$200+34y-4y^2=2z^2 \tag{3}$$
When we substitute the value of $z$ from the equation (2) in equation (3), we get,
$$200+34y-4y^2=2\left(2y-10\right)^2=8y^2+200-80y \qquad\rightarrow\qquad 12y^2-114y=0 \tag{4}$$
Equation (4) has two roots, i.e. $y=0$ and $y=9.5$, where the latter is the only acceptable solution. When we insert this value of $y$ into the equation (2), we get $z=9$. 
Therefore, the the length of the two sides $CA$ and $BC$ can be written as
$$CA=3y=3\times 9.5=28.5\quad \mathrm{and}$$
$$BC=3z=3\times 9=27.$$
Now, it is up to you to work out the case where $x=20$.   
