To find the length of AB, we need to add the lengths of AM and MB together.
Given that AM = 5x + 2 and MB = 7x - 4, we can substitute these values into the equation.
AB = AM + MB
AB = (5x + 2) + (7x - 4)
To simplify, we combine like terms:
AB = 5x + 2 + 7x - 4
Next, we combine the constants and the x terms:
AB = (5x + 7x) + (2 - 4)
AB = 12x - 2
Therefore, the length of AB is 12x - 2.