You seem to have code B for entries that have not been adjusted.
The basis for both RSU and ESPP would be adjusted for the amount reported in Box 1 of your W-2. For the RSU that would have been in the year it vested and for the ESPP it would be the year it was sold.
For the RSU, the income would have been listed in Box 14 on your W-2.
For the ESPP, you should have received Form 3922 with the details needed to adjust the basis.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"