Points $X$, $Y$, and $Z$ are on the sides $\overline{QR}$, $\overline{PR}$, and $\overline{PQ}$, respectively, of right triangle $PQR$ such that $PZXY$ is a square. If $PQ = 6$ and $PR = 6$, then what is the side length of the square?
Q
6 Z X
P Y R
6
Let the side of the square = S
QZ / ZX = XY / YR
QZ / S = S / (6 - S)
QZ = S^2 / ( 6 - S)
6 = QZ + S
6 = S^2 / ( 6 - S) + S
6 = [ S^2 + S ( 6 - S) ] / (6 - S)
6 (6 - S) = S^2 + 6S - S^2
36 - 6S = 6S
36 = 12S
S = 3