We will prove that the required smallest possible value is n. Let Ai-s are the rows and Bj-s are the columns of a square table n×n in which the value in row i and column j is (n−1)i+j. So all differences for the Ai-s are equal to 1 and all differences for the Bj-s are equal to n.
Let a be the smallest natural number such that the set {1,2,…,a} contains some of the considered 2n sets, A1 for example. Without loss of generality, we can assume that a∈B1 or a∈/Bj for all j. Consider the numbers a+1,a+2,…,a+n−2 (which are at most n−2) and the sets B2,B3,…,Bn (which are n−1). It follows from Dirichlet's principle that at least one of them, for example B2, does not contain any of these numbers. Since a∈/B2 (because either a∈B1 and B1∩B2=∅, or a∈/Bj for all j) B2 contains at least one number x≥a+n−1 (otherwise the set {1,2,…,a−1} contains B2, which is contradiction with the minimality of a).
Let b1>b2>⋯>bm are the elements of B2 and mark the elements of B2∩A1. Consider x≥a+n−1, such that bj is a marked number and the number of elements (in the ordering of B2) between x and bj is minimal. For x≥bj (the case x<bj is analogous) we consider the largest bk≤x of B2 (not necessarily marked; k=j is allowed). Obviously bk<a+n−1 (otherwise we have a contradiction because the number of elements between bk and bj is less than between x and bj) and because a+1,a+2,…,a+n−2 are not in B2, and also a∈/B2 from above, we get bk≤a−1. Hence x and bk are adjacent elements in B2 with a difference of at least a+n−1−(a−1)=n, as desired.