Hard reset with no password gone wrong

My son was given an iPhone 6s by our friend who has just returned to Australia after a holiday. It still had their data on it. We thought it would just be a matter of linking to iTunes and deleting and resetting to factory setting. Unable to do that. iTunes tells us it cannot find the iPhone and cannot be updated or restored error message 4013. The phone is now stuck in recovery mode. Does anyone have any suggestions.
Here is a guide by Apple in regard to error 4013. https://support.apple.com/en-ca/HT201444. They may not have signed out of the phone so be prepared with the Apple ID & password of the previous owner.

Original thread: https://forums.imore.com/threads/hard-reset-with-no-password-gone-wrong.383114/