Hi and welcome to Using English.
The -ing form of the verb, when used this way, is a gerund. It acts like a noun, and takes the possessive (although most people don't do this -- they say things like "me staying her" or "him coming").
His coming here was a surprise.
I hope my staying here isn't an inconvenience.
Your phoning him at 10 pm was not appreciated!
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.