Triangle XYZ and triangle PQR are similar with sides XY = 4, YZ = 8, and XZ = 9. If PQ = 6, what is the length of QR?