A variable x is live at statement S if there is an execution path starting from S along which x is used before being redefined.
Let us analyze the statements in basic blocks 2 and 3:
Basic Block 2 contains the statement v = r + u:
Variable r is used in block 2 (and also in block 4: q = v + r), so r is live at block 2.
Variable u is used in block 2, so u is live at block 2.
Variable s is neither used in block 2 nor block 4, and is redefined in block 1 (s = p + q) before any use. Thus, s is not live at block 2.
Basic Block 3 contains the statement q = s * u:
Variable u is used in block 3, so u is live at block 3.
Variable s is used in block 3, so s is live at block 3.
Variable r is used downstream in block 4 (q = v + r), and there is no assignment to r between block 3 and block 4. Thus, r is live at block 3.
Taking the intersection of variables live at block 2 and block 3:
{r,u}∩{r,s,u}={r,u} Hence, the variables live at both basic block 2 and basic block 3 are r,u, matching option C.