tan(Q) = RS/RQ
The mnemonic SOH CAH TOA reminds you that ...
... Tan = Opposite/Adjacent
The side opposite angle Q is RS. The side adjacent is RQ. (QS is the hypotenuse, which does not come into play in the tangent function.)
Then ...
... tan(Q) = Opposite/Adjacent = RS/RQ