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$.
$\begin{array}{l}X Z=3+d, X Y=3+12=15, Y Z=12+d \\ \left.X Z^{2}+X Y^{2}=Y Z^{2} \text { (Pythagoras' theorem }\right) \\ (3+d)^{2}+15^{2}=(12+d)^{2} \\ 9+6 d+d^{2}+225=144+24 d+d^{2} \\ 18 d=90 \\ \Rightarrow d=5\end{array}$