First, let's write down what we know.
AB = 3x
AC = 5x+21
Since B is the midpoint, AB is half the length of AC. The sum of AB + AB is equal to the length of AC.
AB + AB = AC
Let's plug in our values.
3x + 3x = 5x + 21
Simplify the left side.
6x = 5x + 21
Subtract 5x from both sides.
x = 21
Now, let's plug in 21 for x in AB
AB = 3x = 3(21) = 63