(i) To find the distance \(AB\), use the distance formula:
\(\sqrt{(9 - p)^2 + (3p)^2} = 13\)
Squaring both sides, we get:
\((9 - p)^2 + (3p)^2 = 169\)
Expanding and simplifying:
\(81 - 18p + p^2 + 9p^2 = 169\)
\(10p^2 - 18p + 81 = 169\)
\(10p^2 - 18p - 88 = 0\)
Solving this quadratic equation using the quadratic formula:
\(p = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\)
where \(a = 10\), \(b = -18\), \(c = -88\):
\(p = \frac{18 \pm \sqrt{(-18)^2 - 4 \times 10 \times (-88)}}{20}\)
\(p = \frac{18 \pm \sqrt{324 + 3520}}{20}\)
\(p = \frac{18 \pm \sqrt{3844}}{20}\)
\(p = \frac{18 \pm 62}{20}\)
\(p = 4 \quad \text{or} \quad p = -\frac{11}{5}\)
(ii) The gradient of the line \(2x + 3y = 9\) is \(-\frac{2}{3}\).
The gradient of \(AB\) is \(\frac{3p}{9 - p}\).
For the lines to be perpendicular, the product of their gradients must be \(-1\):
\(\left(-\frac{2}{3}\right) \left(\frac{3p}{9 - p}\right) = -1\)
\(\frac{2p}{9 - p} = 1\)
Solving for \(p\):
\(2p = 9 - p\)
\(3p = 9\)
\(p = 3\)