to have happened to him or her
Creo que fue lo mejor que pudo haberle pasado.
I think it was the best thing that could have happened to him.
— La Máquina: The Smashing Machine (2025)
What could have happened to him?
— El increíble castillo vagabundo (2004)
Podría haberle pasado a cualquiera.
It could have happened to anyone.
Algo debió haberle pasado a ella.
Something must have happened to her.