Only the current inside the amperian loop contributes in
Line integral of magnetic field
Amperian loop:
Explanation for the correct answer:
In case of option B.
Explanation for the incorrect answers:
In case of option A.
In case of options C and D.
Thus, option B is the correct option.