To determine which statement is true we need to remember the definition of the trigonometric functions:
where opp denotes the opposite leg to the angle, adj the adjecent leg to the angle and hyp the hypotenuse of the triangle.
In the triangle given the hypotenuse is 17. For angle P the adjecent leg is 8 and the opposite leg is 15, then we have:
For angle Q the adjecent leg is 15 and the opposite leg is 8, then we have:
Comparing what we found and the options given we notice that the only correct one is cosQ; therefore, the correct statement is D.