Let's factor:
$$x^2+\textcolor{#800080}{5}x+\textcolor{#5cb85c}{4}$$
Factoring means we want something like:
$$(x+\textcolor{#d9534f}{\_})(x+\textcolor{#2d6da3}{\_})$$

What numbers go in the blanks?

Let's put a and b in the blanks and use FOIL to multiply it out.
$$(x+\textcolor{#d9534f}{a})(x+\textcolor{#2d6da3}{b})$$
$$=x^2+\textcolor{#2d6da3}{b}x+\textcolor{#d9534f}{a}x+\textcolor{#d9534f}{a}\textcolor{#2d6da3}{b}$$
$$=x^2+\textcolor{#800080}{(a+b)}x+\textcolor{#5cb85c}{ab}$$

We see that a and b need to be two numbers that...

Multiply together to get 4:
$$\textcolor{#5cb85c}{ab=4}$$

And add together to get 5:
$$\textcolor{#800080}{a+b=5}$$

Can you think of the two numbers?

Let's think of pairs of numbers that multiply together to get 4.
$$1\textcolor{#5cb85c}{*}4=\textcolor{#5cb85c}{4}$$
$$2\textcolor{#5cb85c}{*}2=\textcolor{#5cb85c}{4}$$

For each pair. let's add the two numbers together to see which pair adds up to 5.

We see that:
$$1\textcolor{#800080}{+}4=\textcolor{#800080}{5}$$

So 1 and 4 are the numbers we were looking for.

Let's go back and fill in the blanks with 1 and 4 to get...
$$(x+\textcolor{#d9534f}{1})(x+\textcolor{#2d6da3}{4})$$
Let's check our answer using FOIL to multiply it out.
We get:
$$(x+\textcolor{#d9534f}{1})(x+\textcolor{#2d6da3}{4})$$
$$=x^2+\textcolor{#2d6da3}{4}x+\textcolor{#d9534f}{1}x+(\textcolor{#d9534f}{1})(\textcolor{#2d6da3}{4})$$
$$=x^2+5x+4$$
so we know our answer is correct.

Answer

Our final answer is:
$$(x+\textcolor{#d9534f}{1})(x+\textcolor{#2d6da3}{4})$$

Calculator Examples

Here are more examples of how to factor expressions in the Factoring Calculator.
Feel free to try them now.