Right Triangle Trigonometry
From the diagram about you can see that
|PX|=√52+122=13cos(12∠PXS)=1213sin(12∠PXS)=√1−1213=513cos(2x)=cos2(x)−sin2(x)cos(∠PXS)=cos(2⋅12∠PXS)=144169−25169=119169
Thank you Rom