@Tara ******
, If you are stamped out at Samui airport (when you check in all itineraries or at least the first two) you will have already left Thailand technically. When in Bangkok, you cannot get a re-entry stamp there.
If you have to check in separately, means you do check in the flight leaving Bangkok at BKK again after picking up your luggage and going to the check-in counter at Suvarnabhumi/BKK, you can get a re-entry permit at BKK.