What is the length of side PQ

Let H be the point where the height drawn from Q falls.
Focus on QHR. It is a right triangle with legs QH and 3 and hypothenuse 5.
We can find QH using the pythagorean theorem:
[tex]QR^2-HR^2=QH^2 \implies 25-9=16=QH^2 \implies QH=4[/tex]
Now, focus on QHP. It is again a right triangle, and this time we know both legs (QH=4, PH = 6) and we're looking for the hypothenuse:
[tex]PQ^2 = PH^2+QH^2 = 36+16=52\implies PQ = \sqrt{52}[/tex]