Cost basis for partially vested stocks exchanged after merger

I have been searching online but cannot find any cases that were similar to my situation.  I am trying my luck here, hoping someone more experienced can give me some hints. 

 

Let's say

  • 8 years ago, I joined a startup company (A) and paid $100 to early exercise 1000 shares of ISOs (with 83b filed within 30 days);
  • 6 years ago, Company A was acquired by another startup company (B) and the 1000 shares of A stock were exchanged for 100 shares of B stock.  An early exercise of the 100 shares of B stock was done without any cost from my side and 83b was filed within 30 days. 
  • 4 years ago, I left Company B and by the time 60 shares of B stock were vested.  The 40 unvested shares were not repurchased by Company B.
  • Last year, I sold the 25 vested shares of B stocks. 

What would be my cost basis for the 60 vested shares of B stock sold last year? Should it be $100 or $100x60/100=$60?  For the 40 unvested shares of B stock, can I report the proportional cost before the merger ($40) somewhere as a loss?

 

Any information will be highly appreciated!  Thanks!