Please note that fees at airports may be higher than at immigration offices. You can go in person to obtain your permit of re-entry or have someone else do it for you. In this case, you will need a power of attorney. Getting this permit can take a long time. It can vary from an hour to half a day. It is best to arrive before lunchtime so that you can get your passport with the re-entry stamp on the same day. Please note that this permit does not extend your visa or residence permit.
It is simply a permit allowing you to return to Thailand and stay for the remaining days of your extension of stay only. Remember that you should note the re-entry permit number on the immigration form when you re-enter Thailand when you arrive in the country.