From the diagram about you can see that
\(|PX|=\sqrt{5^2+12^2} = 13 \\ \cos\left(\dfrac 1 2 \angle PXS\right)=\dfrac{12}{13} \\ \sin\left(\dfrac 1 2 \angle PXS\right) = \sqrt{1-\dfrac{12}{13}} = \dfrac{5}{13} \\ \cos(2x) = \cos^2(x) - \sin^2(x) \\ \cos\left(\angle PXS\right) = \cos\left(2\cdot \dfrac 1 2 \angle PXS\right) = \dfrac{144}{169}-\dfrac{25}{169} = \dfrac{119}{169}\)