Because मेरा दोस्त मेरा घर नहीं आया would be wrong grammar, when talking about objects ( house is technically an object) people tend to use मेरे with some exceptions to this rule.
the rough translation of'tha' is was. They mean the same thing, but nahin aaya tha is a more complete way of saying it, though 'tha' in this context could be just for more emphasis. Hope this helps : )
Tha reaffirms the past tense, in some sense the first is an activity older than second. And also the second is probably just vernacular, not to be used in wrriten forms
Sometimes the Hindi past tense sets the verb's gender to match the object's and other times it matches the verbs gender to the subject's, like in this example. When do I do which? Do I use subject's gender when sentence is intransitive? And object's gender when sentence is transitive?