If a unit wins the combat it can move models from rear ranks and place them in the forward ranks to increase the width of the formation thereby allowing more models to fight. You can increase the width of the formation by up to two models on either or both flanks.
In this situation the Goblins win the combat and expand their formation by moving eight models to increase the width of the unit by two on each flank. Remember - units must maintain equal-sized ranks apart from the rearmost rank.