Explanation:
a^2 + b^2 = c^2
(x+2)^2 + 4x^2 = (3x+4)^2
(x+2)(x+2)+ 4x^2= (3x+4)(3x+4)
x^2 + 2x + 2x + 4 + 4x^2 = 9x^2 + 12x + 12 x + 16
5x^2 + 4x + 4 = 9x^2 + 24x + 16
-4x^2 - 20x - 12 = 0
now we can use the quadratic formula
(-b±√(b²-4ac))/(2a)
I can't type all this so
.....
x = -0.697224362 or -4.302775638
AB can't be negative so it's the first one
so it's equals to 1.302775638