The tritone substitution can be performed by exchanging a dominant seven chord for another dominant seven chord which is a tritone away from it. For example, in the key of C major one can use D♭7 instead of G7. (D♭ is a tritone away from G).
The progression you’re mentioning is the usual passing chord in ...
In key of E major going from B7sus2/4-->Bb7b5-->Amaj7 works.
In key of C#minor going from G#min7-->G7b5-->F#min7 works.
Both have root descending by half steps and then altered dominant seventh chord moving to what are plausible tonic chords or tonicized chords.
The Bb7b5 and G7b5 sound like tritone substitutions.
It's hard to say much more. ...
The core of why these work is the descending chromatic root movement, which is helped along by the chromatically descending sevenths. That is to say, the outer voices, which dominate aurally (in root, close position), move in parallel by descending half-steps.
To illustrate, I'll transpose both progressions to have the same roots.