Explanation:
since you know already that you need the law of cosine (which is nothing else than the generalization of Pythagoras from right-angled triangles to general triangles), why don't you just apply it ?
the law of cosine :
c² = a² + b² - 2ab×cos(C)
c is the side opposite of angle C, a and b are the other 2 sides.
our angle C is here now the angle QPR. the opposite side is QR = 3.
so, we have
3² = 2² + 4² - 2×2×4×cos(QPR) = 4 + 16 - 16×cos(QPR)
9 = 20 - 16×cos(QPR)
-11 = -16×cos(QPR)
cos(QPR) = -11/-16 = 11/16 = 0.6875
FYI : that means
angle QPR = 46.56746344...°