I have to solve the following equation:

x+y=9
xy=54

I changed the first equation to y=9-x to solve for y. I got x(9-x)=54 and then 9x-x^2=54. I then changed 9x-x^2= 54 to -x^2 +9x-54=0. I got stuck around here, can someone explain...

It is a good idea to have your equations start with a positive square term, so switch all the signs

x^2 - 9x + 54 = 0

This equation does not have a real solution, if you want the imaginary values of x, use the quadratic formula.

YOu can see intuitively that there cannot be a real answer.
both the sum and the product are positve, so both x and y must be positive.
just mentally form some ordered pairs (x,y) which add up to 9.
No way will the product reach 54, the largest product you would get is (4.5)(4.5) or 20.25

from the second equation say y = 54/x

then in the first
x + 54/x = 9

x^2 -9 x + 54 = 0
this quadratic has only complex roots
x = 9/2 +/-(1/2) sqrt(-135)
= 9/2 +/- (3/2) sqrt (-15)

To solve the equation -x^2 + 9x - 54 = 0, you can use the quadratic formula. The quadratic formula is given by:

x = (-b ± √(b^2 - 4ac)) / (2a)

In this equation, you have a = -1, b = 9, and c = -54. Substituting these values into the quadratic formula:

x = (-(9) ± √((9)^2 - 4(-1)(-54))) / (2(-1))

Simplifying further:

x = (-9 ± √(81 - 216)) / (-2)

x = (-9 ± √(-135)) / (-2)

Notice that √(-135) is not a real number because the square root of a negative number is imaginary. Therefore, this equation has no real solutions.

Thus, the system of equations x + y = 9 and xy = 54 has no real solutions.