How to solve this group of equations? $$\dfrac{yz(y+z-x)}{x+y+z}=p \tag1$$
$$\dfrac{xz(x+z-y)}{x+y+z}=q \tag2$$
$$\dfrac{xy(x+y-z)}{x+y+z}=r \tag3$$
This group of equations comes from the problem "if the distances of incenter of an triangle to its vertices are $\sqrt{p}$, $\sqrt{q}$ and $\sqrt{r}$. Find the length of sides of the triangle". By applying barycentric coordinates, it is easy to get the group of equations above, with $x$, $y$ and $z$ as three sides of the triangle.
I have no idea how to solve this group of equations now. Any hints? Thanks!

Rearranging, we get
$$p+\frac{2xyz}{x+y+z}=yz$$
$$q+\frac{2xyz}{x+y+z}=xz$$
$$r+\frac{2xyz}{x+y+z}=xy$$
if we multiply two of these equations and divide by the third,
$$\implies x=\sqrt{\frac{(q+a)(r+a)}{(p+a)}}$$
$$\implies y=\sqrt{\frac{(r+a)(p+a)}{(q+a)}}$$
$$\implies z=\sqrt{\frac{(p+a)(q+a)}{(r+a)}}$$
where $a=2xyz/(x+y+z)$ must satisfy a cubic equation
$$a^3-(pq+qr+rp)a-2pqr=0$$
The cubic comes from substituting the expressions for $x,y,z$ into $a=\frac{2xyz}{x+y+z}$ and rearranging.
$$a=\frac{2\sqrt{\frac{(q+a)(r+a)}{(p+a)}}\sqrt{\frac{(r+a)(p+a)}{(q+a)}}\sqrt{\frac{(p+a)(q+a)}{(r+a)}}}{\sqrt{\frac{(q+a)(r+a)}{(p+a)}}+\sqrt{\frac{(r+a)(p+a)}{(q+a)}}+\sqrt{\frac{(p+a)(q+a)}{(r+a)}}}$$
$$=\frac{2\sqrt{(q+a)(r+a)}\sqrt{(r+a)(p+a)}\sqrt{(p+a)(q+a)}}{(q+a)(r+a)+(r+a)(p+a)+(p+a)(q+a)}$$
$$=\frac{2(p+a)(q+a)(r+a)}{(q+a)(r+a)+(r+a)(p+a)+(p+a)(q+a)}$$
So
$$3a^3+2(p+q+r)a^2+(pq+qr+rp)a=2a^3+2(p+q+r)a^2+2(pq+qr+rp)a+2pqr$$
