(z^2+6z)+14(z^2+6z)+45=0

1. Multiply out

z^2 + 6z + 14z^2 + 84z + 45 = 0

2. Combine like terms
15z^2 + 90z + 45 = 0

3. Use quadratic equation to get both answers for z.