If it factors, here is a method that will work all the time.
5x^2+34x+24
multiply the first times the last --- 5x24 = 120
now look for 2 numbers whose product is that and which add up to the middle number
120 = 30x4 and 30+4 = 34
so those numbers are 30 and 4
so rewrite the middle term as the sum of those two numbers
34x = 30x + 4x
then
5x^2+34x+24
=5x^2 + 30x + 4x + 24
=5x(x + 6) + 4(x + 6)
= (x+6)(5x+4)
5x^2+34x+24
2 answers
x^2+34x+c