$S,T$ and $U$ are binary semaphores shared between two concurrent processes $P$ and $Q$. So, $S,T$ and $U$ can have $0$ or $1$ as their value. If they take $0$ as their initial value then, $P$ cannot execute (because it performs down on all $3$ semaphores), In this case for Process $Q$ to execute $W,X$ and $Y$ have to be UP operations in some order. ( but it's not the case as all options are down operations). So, it means to answer this question Initially $S = 1,T = 1$ and $U = 1$.
Process $P$ performs DOWN on $S,T,U$ in order. So if at the same time $Q$ performs DOWN on these binary semaphores in some orders (remember $3*2*1 = 6$ ways), Some of these $6$ ways may result in Deadlock.
In process $P$ , Down on $S$ is performed. So if $W$ is $P(T)$ or $P(U)$, i.e, down on $T$ or $U$ by Process $Q$ Deadlock happens. ( This eliminates $4$ ways) And Confirms that $W$ has to be $P(S)$. Answer (C) for $Q_{1}$
And out of remaining $2-ways$ one is $\color{red}{W,X,Y = P(S),P(T), P(U)}$ which is sure shot answer for $Q_{2}$ And, it's pretty interesting to trace it out that remaining case $\color{green}{W,X,Y = P(S),P(U),P(T)}$ is also deadlock free.