The key thing to note here is that BD goes though vertex B. A perpendicular bisector only goes through the opposite vertex if the triangle is isosceles, meaning that AB = BC. This piece of info allows you to solve the problem:
AB = BC
4x - 1 = 1 + 2x
Solve for x then plug that value into the expressions for AB and BC. You should get the same length for AB and BC.