You can factor trinomials by taking factors of the lead term (x^2) and using them in the front of a set of parenthesis. For instance, if you had 2x^2 as the first term, you would use (2x _____)(x______).
Now to find what goes at the end of the parenthesis, you take factors of the last number. Say our last number was -5, we could use -5 and 1 or 5 and -1. For the purpose of this, we'll use -5 and 1. This would give us (2x - 5)(x + 1).
Now, to be sure you've selected the right ones, you would multiply the two parenthesis together and see if the middle term matches the original equation.
(2x - 5)(x + 1)
2x^2 - 5x + 2x - 5
2x^2 - 3x - 5
So you'll notice that the middle term is -3. If this wasn't the original, you could try those numbers in a different order until you get the correct middle term.