Referring to previous work “by the authors” Let's consider two papers, one by authors A1, A2, A3 and one by authors B1, B2, B3. In the case of two publications by the same research group, some of the authors may be the same, some may be new… Typically, the senior author/team leader is the same, which means that A3 = B3 (in fields where the senior author is typically listed last).

Now, my question is: in which cases is it okay to refer to the earlier work by the words “the authors”, as in “the authors have shown in [ref] that…”? Is it only okay if the two author sets are strictly equal? Or is it used when A ⊂ B or A ⊃ B? Or when the first author is the same?
I would avoid "the authors" unless it is exactly the same set of authors (preferably in the same order).

I don't see anything wrong with "B1, A2 and B3 have shown that..." even when A2 is one of the authors of the present paper.  It seems a little strange at first, but is quite common.  I have also seen phrases like "B1 and the second author have shown that..." to refer to a paper by B1 and A2 while avoiding mentioning A2 by name, but in more complicated examples it gets pretty unwieldy.