Hi Rafaelalvarezm61
I think we will need a little bit more information from you, before it is possible to advise you.
Which pins are you thinking would be good pins to attach these two extra buttons to?
For sending some gcode to the printer, the simplest way will be to send from the host, just like Roberts_Clif has suggested.
Would there be some reason why those commands could not be sent from the host?
When you say "last position", what last position would that be?
When the print has finished?
or position from before you send those three gcodes?