Good evening.
I've been absent from math class due to some health problems, and I've returned recently and have been faced with equations of this type:

The first step I understand, we just do the maths until we can't anymore.

We're given a formula to apply it to, and we slightly adjust the formula.

This step after the formulas is unclear to me, I don't know where to even begin with it. 4a2-24a+36 is probably the result from the solving of two parentheses, my guess being 4(a-3)^2. But, how did they get the upper row? What is the explanation for what's happening between step 2 and step 3? Thank you ahead of time.
I've been absent from math class due to some health problems, and I've returned recently and have been faced with equations of this type:

The first step I understand, we just do the maths until we can't anymore.

We're given a formula to apply it to, and we slightly adjust the formula.

This step after the formulas is unclear to me, I don't know where to even begin with it. 4a2-24a+36 is probably the result from the solving of two parentheses, my guess being 4(a-3)^2. But, how did they get the upper row? What is the explanation for what's happening between step 2 and step 3? Thank you ahead of time.