Math Homework Help

I am currently taking algebra and i am struggling with the concept of composite functions. For example for F(x)= 5x-6 and g(x)=4x^2-5 find (fog)(x),…

I am currently taking algebra and i am struggling with the concept of composite functions. For example for F(x)= 5x-6 and g(x)=4x^2-5 find (fog)(x), (gof)(x). I understand how to write the equations for both and get the answer for the (fog)(x) which is 20x^2-31. I also understand how to write the equation for (gof)(x) which would be 4(5x-6)^2-5. where i am at a complete loss is how the middle number is reached. So the answer is 100x^2 – 240x + 139, i do not understand how the middle number is reached. Looking for someone to explain in steps how to figure out the middle portion of the equation.