If you carefully consider all the cautions when using derivatives to find maxima then
solve {D[log(1+x) + b log(2-x),x] == 0, 1 >= x >= 0 } for x
immediately returns
x=(2-b)/(b+1) and 1/2 <= Re(b) <= 2 and Im(b) == 0