Question on stock cost basis

We sold several different lots of stocks (mostly RSU) in 2020. However, all of that stock had been transferred into a separate stock account in 2016, and the value of that stock was added to our W-2 income that year (even though we didn't sell it). Essentially, we paid taxes on that stock in 2016.

 

How should the cost basis be adjusted for the year that we actually sold it?

 

Since we sold the stock in 2020, we paid taxes on it already, but I did NOT adjust the cost basis, as I didn't realize this had happened. Is there a way I can fix this by amending the 2020 tax return?

 

Is there a way to tell if I paid double tax on this stock, or did this incorrectly?