Take the law of sines $$\frac{a}{\sin A}=\frac{b}{\sin B}$$ and rearrange to get $$\frac{a}{b}=\frac{\sin A}{\sin B}.$$
Divide both sides by $\sin C$ to get $$\frac{a}{b\sin C}=\frac{\sin A}{\sin B\sin C}$$ and write $A$ in terms of $B$ and $C$ to get
$$\frac{a}{b\sin C}=\frac{\sin(\pi-(B+C))}{\sin B\sin C}=\frac{\sin (B+C)}{\sin B\sin C}.$$
Using an identity, we get $$\frac{\sin(B+C)}{\sin B\sin C}=\csc B\csc C\sin (B+C)=\cot B+\cot C$$ and we have $$\cot B+\cot C=\frac{a}{b\sin C}.$$
Rearrange to get $$\cot B=\frac{a}{b\sin C}-\cot C$$ and write the RHS as a single rational expression:
$$\cot B=\frac{a}{b\sin C}-\frac{\cos C}{\sin C}=\frac{a-b\cos C}{b\sin C}.$$
Finally, reciprocate both sides to get $$\tan B=\frac{b\sin C}{a-b\cos C}$$ as desired. This comes from the law of sines, after all.