It depends on your percentage of ownership and if the ownership percentage changed in 2016.
Assuming you were half owner in 1985 and that the first parent's share went to the 2nd parent in 2016; Half of your current cost basis is what you paid in 1985. When the first parent died in 2016 his 25% cost basis steps up to 1/4 of the fair market value (FMV) in 2016*. But if his share went to the 2nd parent, it doesn't affect you. In 2022, the 2nd parent's cost basis steps up to the FMV in 2022.
So your current cost basis for the sale is 50% of the purchase amount in 1985 + 50% of FMV in 2022.
*If they lived in a community property state, the whole 50% would step up. But, that's not relevant to you.