Can someone help me with the following question?
The sum of two numbers is $18$ and their product is $45$. Find the numbers.
I know that the answer is $15$ and $3$. But how do I find that answer algebraically? It tried doing it as $x+y=18$ and $xy=45$ and then $x= 18-y$ and I substituted in $xy=45$. I got it as $(18-y)y =45$, and I don't know what to do next.
$p+q=18 \\ \text{& } pq=45$
So,
$p=\large\frac{45}q$
$\frac{45}q+q=18$
$q^2+45-18q=0$
$q^2-15q-3q+45=0$
$q(q-15)-3(q-15)=0$
$(q-3)(q-15)=0$
Or, q is either 3 or 15.
That makes p either 15 or 3.