'Sequence alignment obtaining all sequences

I've been trying to do some sequence alignment with the following sequences:

ggaatggmeeff

gatge

Im finding it difficult to understand how you determine the final alignment sequences. I am unsure if this is correct. Been reading up online regarding this but still finding myself confused. Would appreciate any insight on this.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source