This homework is not graded. Please do this to your own satisfaction by this week. We will post the solution next week.
Suppose i+t(i)=k. Then the k-th smallest in S union T is xi. Similarly, if j+s(j)=k, then the k-th smallest in S union T is yj. Our goal is to find the smallest i such that i+t(i) ≥ k. Similarly, we can find the smallest j such that j+s(j) ≥ k.