Ошиблась с самого начала
31 - 3x - x^2 = 20x + 7(x - 2)^2
31 - 3x - x^2 = 20x + 7(x^2 - 4x + 4)
31 - 3x - x^2 = 20x + 7x^2 - 28x + 28
0 = 8x^2 - 5x - 3
8x^2 - 5x - 3 = 0
D = 5^2 - 4*8(-3) = 25 + 96 = 121 = 11^2
x1 = (5 - 11)/16 = -6/16 = -3/8
x2 = (5 + 11)/16 = 1