Substance B is more acidic.
When looking at pH, the lower the pH is (or the further away it is from neutrality when moving down the pH scale), the more acidic it is. When something is acidic, it has a relatively high concentration of H+ ions.
Adversely, something that has a high pH (greater than 7) is basic. It has more OH- ions than it does H+ ions.