Let me show you a trick I learned in school-
Perfect 5ths: A/E, C/G, D/A, E/B, G/D
Tritone: B/F
All the intervals I listed as Perfect 5ths are all the white key Perfect, or Major 5ths. In order for those intervals to remain perfect 5ths, they have to share the same accidental(natural, sharp, or flat).
The way I have written, you assume they are naturals, because you don't have to say 'A natural/E natural', that's just what they are.
So if you want a perfect fifth from Ab, then you have to flat the E too. if you want a perfect fifth from Db then you have to flat the A too.
If you want a tritone off any of those intervals, then you either sharp the 1st note of the interval, or flat the last note.
So if you want the tritone above A, flat E. If you want the tritone above E, flat B.
If you want the tritone above Eb, then flat the Bb, which is Bbb, but call it A. A tritone above Db is A.
I probably lost you there, but just think about it and look at the pattern.
The only exception to that is the B/F interval, which already is a tritone as it is. If you want the major 5th below F, you have to flat the B. If you want a Major 5th above B, sharp the F.
TWIST YOUR MIND
What do you get when you invert a tritone? Answer below.
Invert the Perfect 5ths I have listed, and you'll get perfect 4ths.
A/E is a perfect fifth, but E/A is a perfect 4th.
An inverted tritone is still a tritone.