G9.4 In the figure, $\overparen{Q R}, \overparen{R P}, \overparen{P Q}$ are 3 arcs, centres at $X, Y$ and $Z$ respectively, touching one another at $P, Q$ and $R$. If $Z Q=d$, $X R=3, Y P=12, \angle X=90^{\circ}$, find $d$.