\(P + Q = 18\)......\((i)\)
\(R = \sqrt {{P^2} + {Q^2} + 2PQ\cos \theta } = 12\).......\((ii)\)
\(\tan \varphi = \frac{{Q\sin \theta }}{{P + Q\cos \theta }} = \tan 90 = \infty \)
\(P{\rm{ }} + {\rm{ }}Q{\rm{ cos}}\theta = 0\).......\((iii)\)
By solving \((i)\), \((ii)\) and \((iii)\) we will get \(P = 5,\) and \(Q = 13\)