First, we need to expand the term in parenthesis on the right side of the equation using this rule:
(color(red)(x) - color(blue)(y))^2 = (color(red)(x) - color(blue)(y))(color(red)(x) - color(blue)(y)) = color(red)(x)^2 - 2color(red)(x)color(blue)(y) + color(blue)(y)^2
Substituting x for x and 5 for y gives:
y = -2x^2 - 8x + 16 - (x^2 - 10x + 25)
y = -2x^2 - 8x + 16 - x^2 + 10x - 25
We can next group and combine like terms:
y = -2x^2 - x^2 - 8x + 10x + 16 - 25
y = -2x^2 - 1x^2 - 8x + 10x + 16 - 25
y = (-2 - 1)x^2 + (-8 + 10)x + (16 - 25)
y = -3x^2 + 2x + (-9)
y = -3x^2 + 2x - 9
We can now use the quadratic equation to solve this problem:
The quadratic formula states:
For color(red)(a)x^2 + color(blue)(b)x + color(green)(c) = 0, the values of x which are the solutions to the equation are given by:
x = (-color(blue)(b) +- sqrt(color(blue)(b)^2 - (4color(red)(a)color(green)(c))))/(2 * color(red)(a))
Substituting:
color(red)(-3) for color(red)(a)
color(blue)(2) for color(blue)(b)
color(green)(-9) for color(green)(c) gives:
x = (-color(blue)(2) +- sqrt(color(blue)(2)^2 - (4 * color(red)(-3) * color(green)(-9))))/(2 * color(red)(-3))
x = (-color(blue)(2) +- sqrt(4 - 108))/(-6)
x = (-color(blue)(2) +- sqrt(-104))/(-6)
x = (-color(blue)(2) +- sqrt(4 * -26))/(-6)
x = (-color(blue)(2) +- sqrt(4)sqrt(-26))/(-6)
x = (-color(blue)(2) +- 2sqrt(-26))/(-6)
x = (-1 +- sqrt(-26))/(-3)
Or
x = (1 +- sqrt(-26))/(3)