Question 153051
Here's a general quadratic equation using FOIL,
{{{(dx+e)(fx+g)=dx(fx)+dx(g)+e(fx)+eg}}}
{{{(dx+e)(fx+g)=(df)x^2+(dg+ef)x+eg}}}
As you can see it can be complicated. 
Typically a=1, so you can make the assumption that d=f=1.
This is not always true because you could have d=2 and f=1/2, then a=df=1.
When a is not 1, then it becomes more difficult because there are more choices to check. 
.
.
.
Best bet is always start at c and look for its factors, e and g. 
If a=1 it becomes easier.  
The middle term (the x term) is just e+g. 
If a does not equal 1, you can still do it but your number of guesses increases until you hit that right combination of d,e,f,g.
.
.
.
Best bet is to become more familiar with combinations of numbers multiplied together and then added.
As an example, take 5 and 8.
Let's not worry if they're positive or negative. 
Multiplied, they're 40(-40). 
If they're added or subtracted you could get (-13,-3,3,13)
So from 5 and 8 you can get
{{{(x-5)(x-8)=x^2-13x+40=0}}}
{{{(x+5)(x-8)=x^2-3x-40=0}}}
{{{(x-5)(x+8)=x^2+3x-40=0}}}
{{{(x+5)(x+8)=x^2+13x+40=0}}}
.
.
.
If you look at the case where a is not equal 1, it can be more tricky,
{{{(3x-5)(x-8)=3x^2-29x+40}}}
{{{(3x+5)(x-8)=3x^2-19x-40}}}
{{{(3x-5)(x+8)=3x^2+19x-40}}}
{{{(3x+5)(x+8)=3x^2+29x+40}}}
Best bet is always start with the easiest possible solution guess,
If a=3 then start with 
{{{(3x+a)(x+b)}}}
If a=4, then the simplest choices would be,
{{{(4x+a)(x+b)}}}
{{{(2x+a)(2x+b)}}}
As you can see if a has a lot of factors the number of choices grows quickly.
It can be tedious but there are only a limited number of possibilities.
Good luck.