You can replace either the set or individual B string with one of the same gauge. If the strings are [u]old[/u] or [u]cheap rubbish[/u], change the set. If not, just change the string until replacing the set as you say you have a B replacement.
You don't specifiy which so;
[br]Acoustic here.
[br]Single string or set, method is the same. Nothing complex or difficult about it. Have fun.