expanding and factoring in algebra Expanding very simple process, just open round brackets and multiply each with each for example
$(x-6)(x+3) = x^2 + 3x - 6x -18 = x^2 -3x -18$
Factoring is confused me a little for example I have $x^2 -3x -18$ I try to brute force all combinations in my mind and get the result like this
$(x-6)(x+3)$ 
Cold you please recommend some algorithm, how to find factoring in the easy way. 
Thanks.

Here is another alternative
$$
\begin{align}
x^2-3x-18 &= \frac{1}{4}\bigg(4x^2-4\cdot 3x-4\cdot 18\bigg )\\
&= \frac{1}{4}\bigg((2x)^2-2\cdot 3(2x)-72\bigg )\\
\end{align}$$
Now suppose we define $t=2x$
$$\begin{align}
\frac{1}{4}\bigg(t^2-2\cdot 3t-72\bigg )&= \frac{1}{4}\bigg(t^2-2\cdot 3t+9-9-72\bigg )\\
&= \frac{1}{4}\bigg((t-3)^2-81\bigg )\\
&= \frac{1}{4}\bigg((t-3)^2-9^2\bigg )\\
&= \frac{1}{4}\bigg((t-3)-9\bigg )\bigg((t-3)+9\bigg )\\
&= \frac{1}{4}\bigg(t-12\bigg )\bigg(t+6\bigg )\\
&= \frac{1}{4}\bigg(2x-12\bigg )\bigg(2x+6\bigg )\\
&= \bigg(x-6\bigg )\bigg(x+3\bigg )\\
\end{align}$$
This method is probably overkill, but it shines when used to derive the quadratic formula.
