Explanation:
since M is the midpoint, it means that AM = MB.
so,
b² + 5b = 3b + 35
b² + 2b - 35 = 0
the general solution to such a quadratic equation
ax² + bx + c = 0
is
x = (-b ± sqrt(b² - 4ac))/(2a)
in our case (x is called b, don't get confused, as this is not the factor of x) this gives us
b = (-2 ± sqrt(2² - 4×1×-35))/(2×1) =
= (-2 ± sqrt(4 + 140))/2 = (-2 ± sqrt(144))/2 =
= (-2 ± 12)/2 = -1 ± 6
b1 = -1 + 6 = 5
b2 = -1 - 6 = -7
therefore, we have 2 solutions
b = 5
AM = 5² + 5×5 = 25 + 25 = 50
b = -7
AM = (-7)² + 5×-7 = 49 - 35 = 14
control, as AM = MB
MB = 3×5 + 35 = 15 + 35 = 50
or
MB = 3×-7 + 35 = -21 + 35 = 14
AM = MB in both cases, so, all is correct.