Problem with changing Apple ID on iPhone
One new feature of iOS 7 is an activation lock - and this means that you can't sign out or erase the device without entering the proper password for the account to which your device has been locked.


http://support.apple.com/kb/HT5818


Towards the bottom of the article, it has a link to use My Apple ID web page to check and reset your password if you have forgotten it.


https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/


Presumably, if you can't reset the password, you might need to reach out to Apple directly and see if there is an administrative process such as mailing them proof of purchase or correctly answering questions about past billing events to have them reset the account password.