What is the value of $x+y$ if x and y are co-primes and $PR=\dfrac{x}{y}$ in the diagram? 

$ST$ is the perpendicular bisector of $PR$ and $SP$ is the angle
  bisector of $\angle QPR$. If $QS=9cm$ and $SR=7cm$ then
  $PR=\dfrac{x}{y}$ where x, y are co-primes. $x+y$=?

Source: Bangladesh Math Olympiad 2015 junior category. 
I found that $PS=7$, but I can't get the value of $PR$. 
 A: Here's a solution with less algebra:

Note first that $R$ is the mirror image of $P$ across $ST$. Consider now the point $Q'$ obtained by reflecting $Q$ across $ST$. We obtain an isosceles trapezoid $PQQ'R$, which is a cyclic quadrilateral. We know that $|PS| = |RS| = 7$ and $|QS| = |Q'S| = 9$, and that $\angle QPS = \angle SPR$.
Let $a := |PR|, b := |PQ| = |Q'R|, c := |QQ'|$.
Since $\angle QPQ' = \angle Q'PR$, we know by the inscribed angle theorem that $b = c$, and by the intercept theorem through $S$ we find that $c : a = 9 : 7$, so $b = c = \frac{9}{7} a$.
Now we can use Ptolemy's theorem, which yields $ac+b^2 = (9+7)^2$. Replacing $b$ and $c$ we get $\frac{9}{7}a^2 + \frac{9}{7}\frac{9}{7}a^2 = 256$, so $a^2 = \frac{256}{\frac{9}{7} + \frac{9}{7}\frac{9}{7}} = \frac{12544}{144}$ and $|PR| = a = \frac{112}{12} = \frac{28}{3}$.
The solution is therefore $28 + 3 = 31$.
A: 
As shown, by the angle bisector theorem,
$${(\sqrt{7^2-a^2} + \sqrt{9^2-a^2})\over 9}={(\sqrt{7^2-a^2} + \sqrt{7^2-a^2})\over 7}$$
Simplify,
$$7\sqrt{9^2-a^2}=11\sqrt{7^2-a^2}\implies 7^29^2-49a^2=7^211^2-121a^2\implies 72a^2=$$
$$7^2(11^2-9^2)=7^2\times40\implies a^2={245\over 9}$$
Therefore $PR=2\sqrt{7^2-a^2}=2\sqrt{49-{245\over 9}}=2\sqrt{{196\over 9}}={28\over 3}$
