The correct answer is four base pairs.
BamHI is endonuclease meaning that it has the ability to cut DNA at specific target site. The recognition sequence of BamHI is 5'-GGATCC-3 and it cleaves it after the first G. Sticky ends are formed as a result of that cleavage remaining a four-base 5' overhang in one molecule and a complementary 5' overhang in the other. These ends are can be joined back together by an enzyme called ligase.