This is solved the way any 2-step linear equation is solved:
... A = (1/2)bh + (1/2)(p+q)L
... A - (1/2)(p+q)L = (1/2)bh . . . . . subtract the term on the right
... (A -(1/2)(p+q)L)/(1/2·h) = b . . . .divide by (1/2)h, the coefficient of b
... b = (2A -(p+q)L)/h . . . . . . . . . . simplify