That's no problem at all. You are not wasting my time.
However, it's really a fairly simple situation.
If he used his friends ID on the iPhone then he MUST use his friend's password XXXXX unlock it now.
What you are seeing on the iPhone is called "Activation Lock" and it is a security feature. There is no workaround for this as it is to prevent theft of the iPhone. As far as Apple is concerned at this point, the iPhone belongs to your nephew's friend.
Once your nephew unlocks the iPhone with his friend's password XXXXX he needs to make sure to remove all instances of his friend's ID from the iPhone.
Most specifically, he should remove it from Settings > iCloud
by deleting the account.
He needs to have an Apple ID of his own in the future or one created by a parent or guardian.If you still have concerns, please do not negatively rate my answer, simply reply back before rating. I'll be more than happy to work with you further
. Hopefully, this info will answer your question. When you are satisfied, please give my answers a positive rating. You are judging my personal service only (not this website or your issue) and high ratings assure I remain in good standing.
Thanks and good luck,