Vieta's formulasis helpful when two of the four variables $p$, $q$, $x_1$ and $x_2$ are given and the other two are searched.
Given is a quadratic equation in the canonical form: $x^2+px+q=0$.
Vieta's formula says:
Using Vieta's formula, construct a quadratic equation in the canonical form that has the solutions $x_1=-1$ and $x_2=-5$.
Determine $p$ with Vieta's formula
Determine $q$ with Vieta's formula
Insert $p$ and $q$ in the canonical form