How to check? (to minimize chances of silly error during exams)
1st instruction is read on X from T1, so look for W. We get w2(Y), see if it for same variable and then if its from different transaction. Here its not so ignore and move ahead. w1(X), same transaction so ignore.
2nd instruction is read on Y from T2, so look for W. We get w2(Y), see if it for same variable and then if its from different transaction. Here it is both, so draw a directed edge from T1 -> T2. As there are only 2 transaction and we already have an edge from T1->T2, so no need to check for subsequent instructions.
3rd instruction is read on X from T2, so look for W. We get w2(Y), see if it for same variable and then if its from different transaction. Here it is both, so draw a directed edge from T2 -> T1.
As there is a cycle so its not CS.