My phone was disabled so I connected it with iTunes. We unlocked it and now it is requesting the old Apple ID. I don't know the old one but my brother made a password reset, and now it gave us a code but there is nowhere to type it in on the phone. The screen didn't reset for us to type in the code. What do I do?
You can type in that code immediately after your password in the password field.
What if I use two-factor authentication on a device running older software?
If you use two-factor authentication with devices running older OS versions, you might be asked to add your six-digit verification code to the end of your password when signing in. Get your verification code from a trusted device running iOS 9 and later or OS X El Capitan and later, or have it sent to your trusted phone number. Then type your password followed by the six-digit verification code directly into the password field.