Factor by grouping: $xw + 3x - 6w - 18$ and Factor: $3x^2-5x-2$ These two factoring problems have me stumped. I'm certain my factoring is correct. I'm getting it marked as incorrect online though. To make sure, I'm asking you for help. When providing an answer for a factoring problem is it correct to simply write the solution like such: 
$$xw + 3x - 6w - 18 = (x-6)(w+3)
\\
3x^2 - 5x - 2 = (3x+1)(x-2)$$
Or is there a more formal, more correct way to illustrate it?
Thanks in advance
 A: For sure both are correct.
For the first equation I would write one more step:
$$xw+3x-6w-18=x(w+3)-6(w+3)=(w+3)(x-6)$$
For the second equation I also would include some more steps:
$1.$ Find the roots $-1/3$ and $2$:
$2.$ Use the standard approach:
$$3(x+1/3)(x-2)=(3x+1)(x-2)$$
Or you can simulate a factoring (knowing the roots):
$$3x^2-5x-2=3x^2-6x+x-2=3x(x-2)+x-2=(3x+1)(x-2)$$
$$$$
A: Thanks for the replies all. All appreciated. I tried (x-6)∗(w+3) and got the answer correct. It would appear I need the star symbol in between the parenthesis. As for the other expression, it makes good sense to factor the 3 to have x by itself, but entering 3*(x+(1/3))*(x-2) did not work. Thankfully, I got one of these two right, so I passed the the quiz. It will take another 8 hours to try 3 more attempts to get the other factoring solution right, so I'll have to wait. 
A: For $xw+3x-6w-18$:
Observing the coefficients, notice how the first two terms have a ratio of $1:3$ while the last two terms have a ratio of $6:18=1:3$. Thus, we can factor by grouping:$$\begin{align*}xw+3x-6w-18 & =x(w+3)-6(w+3)\\ & =(w+3)(x-6)\end{align*}$$
We can verify this by re-expanding $(w+3)(x-6)$ into $w(x-6)+3(x-6)$ which gives us the same expansion as the problem.

For $3x^2-5x-2$
This is a quadratic, so we equate it equal to the factorization$$\begin{align*}3x^2-5x-2 & =(3x+\alpha)(x+\beta)\\ & =3x^2+(3\beta+\alpha)x+\alpha\beta\end{align*}$$
Equating coefficients, we have\begin{align*} & 3=3\\ & 3\beta+\alpha=-5\\ & \alpha\beta=-2\end{align*}
The last two equations make a system of equation. Since $-2=-1\times 2$ or $-2=-2\times1$, we have $\alpha=-1,\ \beta=2$ or $\alpha=-2,\ \beta=1$. But which one is correct?
Since they are systems, $\alpha,\ \beta$ must also satisfy $3\beta+\alpha=-5$. Therefore,$$3x^2-5x-2=(3x+1)(x-2)$$

Basically, to factor $ax^2+bx+c$, find two numbers $r,\ s$ whose sum is $-\dfrac ba$ and have a product of $\dfrac ca$. This is Vieta's formula.
