How did a "B-side" songs make the charts?

DJs played it. That simple. Chart positions weren’t just sales figures - they also included airplay. If the “B” side got more airplay, it would chart and get the sales figures as opposed to the “A” side.

As for the double-sided part - same same. If the Beatles released “She Loves You” as an “A” side and “Please Please Me” as a “B” side, both will chart and both will get played in the juke boxes.