Restore your iPhone as new. If no problems, add your apps back a few at a time.
If problem develops, it is with the last group of apps - delete them and add them
back one at a time until you find the problem. Photos can be restored after the
problem is resolved - photos should be synced with an applications (Photos? or
whatever you choose) on your Mac. Restore notes at the end as well. Small steps
are needed to see where the problem lies.
Since the iPhone keeps asking for his AppleId, something on your iPhone is associated
with his AppleID. The only way to find out what is to setup the iPhone as new and
add things back until you get the ID request again. While it will be a slow process,
it will get you there.