Hi, this a basic question but Im just not getting it for some reason and it's keeping me from moving forward with the mountain of math HW I have. Its an example problem

f (x) = 2x^2 + 8x+5 then it is factored out

f (x) =2(x^2+4x) +5 the the square is completed to form

f (x) = 2(x^2+4x+4) +5-8 and I dont understand where the 8 comes from

the it is reduced down to

2(x+2)^2-3 and I get how 5-8 equals -3 but how is the rest of it reduced down to that? What happened to the 4x?

Any insight is very much appreciated!! Hope everyone is having a nice sunday morning!