It’s tough - sometimes, you kind of just outright win. I mean, the other player can try to be really clever and get out of the situation, and I’m usually somewhat lenient in situations like that. For example, if someone gets trapped under rocks, they might say, “OK, well, I use my Tunnel-wise skill - the cave-in revealed an entrance to an abandoned mine that might lead to the surface!” Something like that. If they don’t have the skill, they can try a Beginner’s Luck for it.
If they’ve got a Persona point, they can blow it to introduce a Complication - don’t forget that. So there might still be a way out - they can re-frame the situation into something that might use one of their good skills.
As a GM, I’ll nudge players and give them ideas for ways to get out of seemingly hopeless situations. I mean, it’s not really fun when someone just loses and can’t do anything about it. “Rocks fall; everyone dies.” That’s shitty. But if a player is just frustrated and not engaging the system, that’s on them. Throw 'em a couple of lifeline ideas - the Persona complications, various skill tests, Beginner’s Luck, etc - and let them run with it.
Try not to outright invalidate the other player’s success - let it stand. The idea is that you should offer suggestions that further color and complicate the situation for everyone.
Now, it’s possible that a player acts outside of the buy-in for the game. Maybe you’re all a group of adventurers and someone says “I turn to my friend and kill him” for no apparent reason. If something runs the risk of derailing the game for no good reason, without really doing anything to advance the story, against the wishes of everyone else and what you agreed would be the tone of the game - well, they’re kind of an asshole. When someone’s being a total douchebag in the game, and essentially griefing the party, I have few reservations about being a total dick to them right back.
I highly encourage you to probe somebody who wants to do something that seems way out of whack or potentially game-stopping. Why are they doing that? Are they frustrated? Do they feel like that’s the only way they can make something happen in game? Maybe you’ll find out that you’re setting your obstacles too high, or that they’re not interested in the direction their character is going - something will reveal itself.