If the iPad is Activation Locked with an AppleID that you do not control, you’re going to have difficulty. Insofar as Apple’s security process is concerned, if the AppleID is not yours, then the iPad is owned/controlled by somebody else.
Here are the Apple support pages that outline the Activation Lock - and the only mechanisms by which it can be turned off:
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, you’ll not be able to defeat or bypass the Activation Lock. With documentary evidence that you are the original owner (such as sales receipt showing the serial number), Apple may be prepared to assist - otherwise they 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.
However, this isn’t necessarily the end of the story...
A close Family member or Executor, with the required supporting paperwork, can make application to Apple to be granted access to the Apple accounts of the deceased:
How to request access to a deceased family member's Apple accounts - Apple Support
You should note that if successful, this process will grant access to some information stored in iCloud - but will not, of itself, resolve access to the iPad.
Quite often, close family also have sufficient knowledge - and access to likely recovery paths - that access to the AppleID account of the deceased family member can be recovered.
The following guidance is written from the perspective of the owner - but a family member will get the idea as they run through the process.
To recover the credentials, you’ll need access to any one of the following:
- The primary email address mailbox that corresponds with the AppleID
- Any of the secondary/recovery email addresses that should be configured for the AppleID account
- Any of the trusted telephone numbers (fixed line or Cellular/Mobile) that are associated with the AppleID
More information about recovery of the AppleID and associated Password:
If you forgot your Apple ID - Apple Support
If you forgot your Apple ID password - Apple Support
When (if) you recover access to the credentials, you would be well advised to log-in to the AppleID account from a web browser - and verify/update any email addresses and trusted telephone numbers:
https://appleid.apple.com/
If the passcodes of any devices are unknown, the data stored on the device itself is now gone. That said, if the device(s) have an associated iCloud backup, you can restore the backup to the device after recovering access to the AppleID account.
If your intent is to wipe/reset the device (after resolving the Activation Lock) for reuse by a new user, you would be best advised to prepare it properly:
What to do before you sell, give away or trade in your iPhone, iPad or iPod touch – Apple Support