Pet safe traps, baited with treats and bedding materials.
Lift floor board if possible to encourage exit if safe to do so
When hamster back review enclosure security. I always added bulldog clips to cage doors, never trusted the cage door latches alone