Stanley called a person A (or any person with the room's key, including Natalie) a favor to invite them to their room. Person A dropped a bomb or detonation-based device inside the room while he wasn't aware, alongside the room's key. Upon person A leaving the room, Stanley himself locked the room from the inside, and Stanley's actual murderer (person B) detonated the device from afar, killing him from long range.