As shown in the figure, P and Q are two coaxial conducting loops separated by some distance. When the switch S is closed, a clockwise current lp flows in P (as seen by E) and an induced current lQ1 flows in Q.The switch remains closed for a long time. When S is opened, a current lQ2 flows in Q. Then the direction lQ1 and lQ2 (as seen by E) are
The rule is called Lenz's Law. You already appear to know how to determine the direction of the magnetic field due to a current in a loop, which is part of the answer. What Lenz's Law tells us is that the direction of the induced current in the loop is such that it "opposes the change in the flux".
In first case current in P is increased so current induced in the coil Q in opposite direction anti-clockwise according to Lenz's law.
In second case current in P is decreased so current induced in the coil Q in same direction clockwise according to Lenz's law.
Hence the D option is corrent