B7 is built from B, D#, F# and A. B is the root, D# the major third, F# the fifth and A the minor seventh. Said aloud, its notes are B, D sharp, F sharp and A.
From the low string to the high one you hear B, D#, A, B and F#. The root, B, shows up twice in the main shape. The lowest note is B on string 5 and the highest is F# on string 1.
In B7, string 2 is played open and adds B. String 6 stays silent. Everything fits between frets 1 and 2. The second shape on this page starts at fret 7.
B9 is one change away. String 2 is pressed at fret 2, bringing in C#, the ninth of B9. It shares two notes with G#m, B and D#. Going to B, two positions stay the same.
B7 shows up in two keys. In E major it is the V7 and in E minor the V7. Further down there is a song that uses it.