A=1/2h(B+b)(for b)

multiply both sides by 2/h
Then, subtract B from both sides.