If you can contact the previous owner, you can ask the previous own to sign out of the Apple ID or unlock the device remotely via iCloud.com. If you have the purchase receipt with the serial number on from an authorized seller, you can go to Apple store to bypass forgotten Apple ID.