Origins of possessive pronouns
Solution 1:
The possessive 's comes from the masculine genitive case ending on -es in Old English. This means that you could say "of [the] man" by simply sticking -es after "man". The genitive case was often used to indicate the possessor of something. In German, the genitive case is still used, and it ends on -(e)s for masculine and neuter singular words: the man = der Mann; the man's house = des Mannes Haus. As you see, the genitive is also used with articles.
The s in which most possessive pronouns end comes from the same genitive ending, either directly or indirectly by analogy. The genitives his, whos and yours (plural) already existed in Middle English.1 It is conceivable that modern hers, for example, which was something like her in Middle English, was formed by analogy with the possessive pronoun his, or by simply attaching the possessive s to it, if that already functioned as a productive suffix. Note that the apostrophe is of later date than the possessive s: the possessive of summer was simply summers in the time of Shakespeare.2