We have from the figure Δ PMQ is right-angled triangle.
Then PQ2=102+82......(1)
Also from right-angled triangle Δ PMR we have
PR2=MR2+102.......(2).
Now from right-angled triangle Δ PQR we get,
PR2+PQ2=(8+MR)2
or, 82+2.102+MR2=82+16MR+MR2
or, 16MR=200
or, MR=12.5.
QR=12.5+8=20.5