Factor the expression by grouping. First, the expression needs to be rewritten as $P^{2}+aP+bP-77$. To find $a$ and $b$, set up a system to be solved.
$$a+b=4$$ $$ab=1\left(-77\right)=-77$$
Since $ab$ is negative, $a$ and $b$ have the opposite signs. Since $a+b$ is positive, the positive number has greater absolute value than the negative. List all such integer pairs that give product $-77$.
$$-1,77$$ $$-7,11$$
Calculate the sum for each pair.
$$-1+77=76$$ $$-7+11=4$$
The solution is the pair that gives sum $4$.
$$a=-7$$ $$b=11$$
Rewrite $P^{2}+4P-77$ as $\left(P^{2}-7P\right)+\left(11P-77\right)$.
$$\left(P^{2}-7P\right)+\left(11P-77\right)$$
Factor out $P$ in the first and $11$ in the second group.
$$P\left(P-7\right)+11\left(P-7\right)$$
Factor out common term $P-7$ by using distributive property.
$$\left(P-7\right)\left(P+11\right)$$
Steps Using the Quadratic Formula
Quadratic polynomial can be factored using the transformation $ax^{2}+bx+c=a\left(x-x_{1}\right)\left(x-x_{2}\right)$, where $x_{1}$ and $x_{2}$ are the solutions of the quadratic equation $ax^{2}+bx+c=0$.
$$P^{2}+4P-77=0$$
All equations of the form $ax^{2}+bx+c=0$ can be solved using the quadratic formula: $\frac{-b±\sqrt{b^{2}-4ac}}{2a}$. The quadratic formula gives two solutions, one when $±$ is addition and one when it is subtraction.
$$P=\frac{-4±\sqrt{4^{2}-4\left(-77\right)}}{2}$$
Square $4$.
$$P=\frac{-4±\sqrt{16-4\left(-77\right)}}{2}$$
Multiply $-4$ times $-77$.
$$P=\frac{-4±\sqrt{16+308}}{2}$$
Add $16$ to $308$.
$$P=\frac{-4±\sqrt{324}}{2}$$
Take the square root of $324$.
$$P=\frac{-4±18}{2}$$
Now solve the equation $P=\frac{-4±18}{2}$ when $±$ is plus. Add $-4$ to $18$.
$$P=\frac{14}{2}$$
Divide $14$ by $2$.
$$P=7$$
Now solve the equation $P=\frac{-4±18}{2}$ when $±$ is minus. Subtract $18$ from $-4$.
$$P=-\frac{22}{2}$$
Divide $-22$ by $2$.
$$P=-11$$
Factor the original expression using $ax^{2}+bx+c=a\left(x-x_{1}\right)\left(x-x_{2}\right)$. Substitute $7$ for $x_{1}$ and $-11$ for $x_{2}$.