<QPR is just the angle created by the segment PQ and PR(the lower left angle of the triangle), and they want you to find the cosine of that angle

They tell you that sin(<QPR)= so using this, and the identity you can get the answer

and take the sqrt of both sides to get

and if you go by the picture, the angle is acute, so the angle must lie in the first quadrant, so we can ignore the negative value