(i) To find the value of \(p\) for which the lengths of \(AB\) and \(CB\) are equal, we first find the vectors \(\overrightarrow{AB}\) and \(\overrightarrow{CB}\):
\(\overrightarrow{AB} = \overrightarrow{OB} - \overrightarrow{OA} = \begin{pmatrix} 1 \\ 5 \\ p \end{pmatrix} - \begin{pmatrix} 2 \\ 3 \\ -4 \end{pmatrix} = \begin{pmatrix} -1 \\ 2 \\ p+4 \end{pmatrix}\)
\(\overrightarrow{CB} = \overrightarrow{OB} - \overrightarrow{OC} = \begin{pmatrix} 1 \\ 5 \\ p \end{pmatrix} - \begin{pmatrix} 5 \\ 0 \\ 2 \end{pmatrix} = \begin{pmatrix} -4 \\ 5 \\ p-2 \end{pmatrix}\)
Equating the magnitudes:
\(\sqrt{(-1)^2 + 2^2 + (p+4)^2} = \sqrt{(-4)^2 + 5^2 + (p-2)^2}\)
\(1 + 4 + (p+4)^2 = 16 + 25 + (p-2)^2\)
\(1 + 4 + (p+4)^2 = 16 + 25 + (p-2)^2\)
\((p+4)^2 = 41 + (p-2)^2\)
Solving gives \(p = 2\).
(ii) For \(p = 1\), find \(\angle ABC\) using the scalar product:
\(\overrightarrow{AB} = \begin{pmatrix} -1 \\ 2 \\ 5 \end{pmatrix}\)
\(\overrightarrow{CB} = \begin{pmatrix} -4 \\ 5 \\ -1 \end{pmatrix}\)
\(\overrightarrow{AB} \cdot \overrightarrow{CB} = (-1)(-4) + (2)(5) + (5)(-1) = 4 + 10 - 5 = 9\)
\(|\overrightarrow{AB}| = \sqrt{1 + 4 + 25} = \sqrt{30}\)
\(|\overrightarrow{CB}| = \sqrt{16 + 25 + 1} = \sqrt{42}\)
\(\cos \angle ABC = \frac{9}{\sqrt{30} \times \sqrt{42}}\)
\(\angle ABC = \cos^{-1}\left(\frac{9}{\sqrt{30} \times \sqrt{42}}\right) \approx 75.3^\circ\) or \(1.31 \text{ radians}\).