Need help to understand how to do this.

Answer: -1(x+2)^2+10
Step-by-step explanation:
1. The coefficient of -x^2 is just the number in front, which in this case would be a = -1 So now the function is -1(x^2+4x)+6 since negative one has been factored out of the first two terms.
2. Half of the coefficient of x would be 2 since x has a coefficient of 4, and half pf 4 is 2. Squared, it is 4. That will be added inside the bracket. Subtracted on the outside is the same equation but multiplied by a, which we found out was -1 in the beginning. So, the function becomes -1(x^2+4x+4)+6-(-4).
3. Factor the inside equation to find that it’ll become (x+2)^2, and simplify the outside to get 10. The function will now be;
f(x)=-1(x+2)^2+10
Hope that made sense and make sure to check just in case I did the math wrong :]