I read a novel(or maybe it's a short story since it is very short) by Alan Titchmarsh called 'Rosie'. It was going well until I stuck at Chapter 4. It writes
How she had managed to be up and out of the house before him was a mystery. Nick knew she hadn't had that much to drink, but it had affected her.
The question is, is him was a mystery gramatically correct?
And how do we use hadn't had correctly and its meaning in this context?