Step-by-step explanation:
For finding one missing side in a right triangle, the Pythagorean theorem is the tool of choice. Here, it tells you ...
QR² = RS² + QS²
QS = √(QR² -RS²) = √(18² -9²) = √243
QS = 9√3 . . . . . as shown in your figure
___
The letters O, A, and H in SOH CAH TOA are references to the Opposite and Adjacent sides and the Hypotenuse. The opposite and adjacent sides are with respect to one of the acute angles in the triangle.
In your triangle QRS, the sides marked with lengths are QR (the hypotenuse) and RS. Side RS is adjacent to acute angle R, and opposite acute angle Q. If you want to use these side lengths to find the values of angles R and Q, you would use the SOH CAH TOA relations that involves the sides you have.
For angle R, you have A and H, so you use the cosine relationship:
cos(R) = A/H = 9/18 = 1/2
You need to use your knowledge of the cosine function, or use the inverse cosine function on your calculator to find the angle:
R = cos⁻¹(1/2) = 60°
__
Since you now know the value of angle R, you know that angle Q is 30° (the complement of 60°). If you want to use SOH CAH TOA to find it from the side lengths marked in the figure, you would choose the sine relationship. That is because you have the opposite side (RS) and the hypotenuse (QR).
sin(Q) = opposite/hypotenuse = 9/18 = 1/2
Again, the inverse function (or your knowledge of sine function values) is needed:
Q = sin⁻¹(1/2) = 30°
___
Of course, once you found the length QS, you have all three side lengths to choose from, so any of the trig functions could be used to find the acute angles:
sin(R) = O/H = QS/QR = (9√3)/(18) = √3/2
cos(R) = A/H = RS/RQ = 9/18 = 1/2
tan(R) = O/A = QS/RS = (9/√3)/(9) = √3
__
sin(Q) = O/H = RS/RQ = 9/18 = 1/2
cos(Q) = A/H = QS/QR = (9√3)/(18) = √3/2
tan(Q) = O/A = RS/QS = (9)/(9√3) = √3/3
__
The short answer is that you use the tool that makes use of the information you have available. If several possible tools can be used, you can choose the one that is easiest to use (requires the fewest computation steps, or makes use of rational, rather than irrational, numbers).