Point M is the midpoint of segment AB.
AM=3x+40 and MB=x^2. Find x and AB

[tex]\text{Hello there! :)}[/tex]
[tex]x = 8\\\\AB = 128 \text{ units}[/tex]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[tex]\text{Since Point M is the midpoint of AB, then:}\\\\AM = MB\\\\[/tex]
[tex]\text{Set the two equations equal to each other:}\\\\3x + 40 = x^{2} \\\\[/tex]
[tex]\text{Move all terms over to one side to simplify more easily:}\\\\0 = x^{2} - 3x - 40[/tex]
[tex]\text{Factor by finding numbers that sum up to -3 and multiply into -40:}\\\\0 = (x - 8)(x + 5)\\\\x = -5, 8[/tex]
[tex]\text{The length of a segment cannot be negative, so choose the positive solution:}\\\\x = 8[/tex]
[tex]\text{Substitute in this value of x into either AM or MB to solve for AB:}[/tex]
[tex]AB = 2(MB)\\\\AB = 2(x^{2} )\\\\AB = 2(8^{2})\\ \\AB = 2(64)\\\\AB = 128 \text{ units}[/tex]