A farmer uses 50 m of fencing to enclose a rectangular area against a long straight wall. What must be the dimensions of the enclosure if its area is to be $300 m^2$? The question requires the use of simultaneous equation to solve.
Here is what is obtained, but not sure why solving the equation got complex answers. Did I form the equation incorrectly? The equation seems alright to me. Answers: length = 30, width = 10 or length 20, width = 15
length = x, width = y
$$area: xy = 300$$ $$perimeter: 2x+2y=50 => x+y =25$$
$$y=25-x$$ $$x(25-x)=300$$ $$25x-x^2=300$$ $$x^2-25x+300 = 0$$ (got complex when solving for x, which is incorrect)