Maximum distance: 30,450 kilometers.
For every 5 kilometers driven using this rotation, each tire will lose (2/29000)+(2/21000) of its tread.So, suppose we drive 5*N kilometers like this. Then, each tire will lose 2*N*((1/29000)+(1/21000)) of its tread. We wish to determine N so that the latter expression gets to be 1, representing all of each tire's tread. That happens when N=6090, which is when 5*N (the total kilometers were driven) is 30,450.