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

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.
