Capital gain on oversea real estate

I purchased an apartment overseas nine years ago as a US non-resident. The apartment value increased before I moved to the US with a working visa. 

 

I obtained a US green card in recent years and sold overseas real estate this year. Can you suggest calculating the long-term capital gain, particularly on the cost basis? Thanks!