how to determine basis for corporation and shareholders?

the question is: In April, A and B formed X Corp. A contributed $50,000 cash, and B contributed land worth $70,000 (with an adjusted basis of $40,000). B also received $20,000 cash from the corporation. A and B each receives 50% of the corporation's stock. What is the tax basis of the land to X Corp.? a. $40,000 b. $50,000 c. $60,000 d. $70,000 will anyone help me to solve such questions: 1、Is this a tax-free transaction for both corporation and shareholders?and the reason? 2、becker software said the basis of land is 60,000=(40000NBV+20000the price not named boot),20,000 cash is a price for the land but not a boot, so B can't recognize gain. is the cash not boot? 3、what is the stock basis for both shareholders? (I think stock basis for A=50000,and for B=NBV(40000)+GAIN(20000)-BOOT(20000)=40000,does the formula and amount of B is right?)