The seventh letter
C, D, E, F, G, A, B make seven letter names. C–B and C–B♭ are both sevenths.
One or two steps below the octave
The next C is twelve semitones away. C–B is a major seventh (M7) at eleven, one step below it. C–B♭ is a minor seventh (m7) at ten, two steps below it. The two target keys are adjacent.
Practice the relationship
Find the octave from any root, then move back one or two keys to identify M7 and m7.