In this sentence, "him and I" are the indirect objects of the verb "bought," meaning they must be in the objective case. While "him" is already an object pronoun, "I" is a subject pronoun and must be changed to the object pronoun "me." Changing "him" to "he" would incorrectly introduce a subject pronoun into an object position.