A isn't 1?

I ran into this problem-

5x^2 + 49x + 72

And I just don't remember how the heck to factor problems like that, and when I use what I remember I get (5x+40)(x+9) But the factor calculator I'm using says the 40 is actually an 8.

Where the heck am I malfunctioning? What do I do? Can anyone tell me what to when the A isn't 1 in a ax^2+bx+c expression? Am I supposed to divide the 40 by 5 to get 8?