The (emulated) CPU has no idea that you meant for the program to terminate after the print integer
syscall. You need to tell it that that's what you want explictly, otherwise it will just keep on executing the next instruction (so it will end up in an infinite loop where it executes AddMeth
and then the print integer
syscall over and over).
The exit
syscall in SPIM/MARS is number 10, i.e:
li $v0, 10
syscall
You also seem to have mixed up $a2
and $s2
in a couple of places.