You probably know when to use I or me, and we usually choose the correct form by instinct. Choosing between me or my is sometimes a bit trickier.
Me is used as the object of a verb or preposition. You use me to refer to yourself.
In short answers, we usually use this form.
My is a possessive adjective.
My mother loves me.
Now consider the following sentences:-
"I'm going to me and Margaret's room." or "I'm going to my and Margaret's room."
Which is correct? Me or my?
Simplify the sentence by removing the second person:-
"I'm going to my room." So, "I'm going to my and Margaret's room," is correct.
A real point of confusion arises when considering the use of "my" or "me" as the "subject" of a gerund.
The teacher didn't like me telling jokes in class.
The teacher didn't like my telling jokes in class.
But which is correct? Well they both are - sort of, but the use of the possessive, "my telling jokes in class " serves to isolate the telling of jokes as the object of my teacher's anger. It's hopefully not "me" at whom she/he has become upset, but the telling of jokes. In the sentence, "me telling jokes in class", it might seem as though the teacher doesn't like me personally. The rule is that the subject of a gerund is supposed to be in the possessive case.
Remember though that this is a purists view. Both are now becoming acceptable through common usage. However, you can avoid any confusion by writing the sentence in a different way:-
"The teacher didn't like the way I told jokes in class."