Answer
$p^2-7p+\frac{49}{4}=(p-\frac{7}{2})^2$
Work Step by Step
We add the square of half of the coefficent of $p$ so that the result is a perfect square trinomial.
Co-efficient of $p=-7$
Half of -7 is $\frac{1}{2}×-7=\frac{-7}{2}$
Square of $\frac{-7}{2}$ is $\frac{-7}{2}×\frac{-7}{2}=\frac{49}{4}$
We add $\frac{49}{4}$ to $p^2-7p$ to make it a perfect square trinomial.
Hence it becomes $p^2-7p+\frac{49}{4}$
Factored form-
$p^2-7p+\frac{49}{4}$
$= p^2-\frac{7}{2}p-\frac{7}{2}p +\frac{49}{4} $
$=p(p-\frac{7}{2})-\frac{7}{2} (p-\frac{7}{2})$ (Taking the common factors)
$=(p-\frac{7}{2}) (p-\frac{7}{2})$ ($(p-\frac{7}{2})$ is taken common from both the terms)
$=(p-\frac{7}{2})^2$