Chosen Solution
i have iphone 5, it needs activation lock, the problem is i don’t have the previos owner’s apple ID and contact, any solution that situation please help”
Try to return it to it’s original owner via social media, gumtree etc.
The activation lock is set on the server side, not locally. There is nothing you can do on your side except contacting Apple, providing proof of purchase and letting them unlink the account to this phone.