B7 is another barre chord which means your index finger has some work to do! Start by placing it over all the strings of the second fret, leaving a small portion of the top hanging over. The goal is to use your index to press all the strings down at once, you may need to make little adjustments until they all sound right. After you are sure you have no dead strings use your middle finger to play the third fret of the C string. Keep that top middle finger joint straight up to avoid touching other strings.