First, never allow anyone that you don’t explicitly trust any access to your iPad (or iPhone). Be aware that aside from issues such as you have experienced, if you allow someone to sign-in to a different AppleID account with the device, you cannot change the signed-in user for 90-days.
As for your problem, the iPad is Activation Locked. As you may already be aware, simply restoring your iPad will not remove an activation lock.
Here are the Apple support pages that outline the Activation Lock - and the only mechanisms by which it can be satisfied:
Activation Lock for iPhone, iPad, and iPod touch - Apple Support
Turn off Activation Lock – Apple Support
As you will discover, unless you are the owner of the AppleID that was last used to activate the device, or unless you can secure the cooperation of the previous owner, you’ll not be able to defeat or bypass the Activation Lock. Without documentary evidence that you are the original owner (such as sales receipt showing the serial number), Apple won’t assist - and nobody here will be able to help you.
If you have the necessary documentation, Apple have introduced a portal though which you may be able to request release of an Activation Lock:
How to remove Activation Lock - Apple Support & start an Activation Lock support request.
Unfortunately, in your situation, you won’t be able to use the online Activation Lock removal processes - as the Activation Lock applies to someone else’s AppleID Account.
Your only hope of having the Activation Lock removed is to provide documentation that demonstrates, to Apple’s sole satisfaction, that you are the owner. For obvious reasons, Apple have very high standards of proof, without which they will decline to assist. Key to proving ownership will be the original sales invoice - that clearly shows the serial number or IMEI of the device. Without this document, your chance of successfully proving ownership will be very slim.