If B is the midpoint of AC, then AB = BC.
We have AB = x + 5 and BC = 2x - 11.
Therefore we have the equation:
x + 5 = 2x - 11 subtract 5 from both sides
x = 2x - 16 subtract 2x from both sides
-x = -16 change the signs
x = 16
Put the value of x to the expression x + 5:
AB = 16 + 5 = 21