Hey there, and welcome to Apple Support Communities, Cappy99!
From our understanding, you want to factory reset an iPhone, but don’t know the Apple ID password. We’d be happy to help get you underway!
Since it sounds like the iPhone might have Find My enabled, we’d need to reset the password for the Apple ID since he doesn’t remember it using: Change your Apple ID password - Apple Support Depending on his Apple ID security type, he may need a verification code in order to complete that process, which he may be able to request from a different device using: Get a verification code and sign in with two-factor authentication - Apple Support
Once complete, he’ll want to complete the process here: What to do before you sell, give away, or trade in your iPhone, iPad, or iPod touch - Apple Support
Cheers!