Also, you have two different equations there. If you wanted to factor the first one (the one with 13 in it) you'd need to find two numbers that multiply together to give 40 AND add together to get 13. When I look for that combination, I find 8 and 5. So one of your factors is (x+8) and the other one is (x+5).
hope that helps!