Corporate formation sim in Becker and wiley

In Becker and Wiley there is a simulation on corporate formation. I'm not sure how they came up with the corporations basis and would appreciate some help! Example : token (shareholder) ownership: 15% Sh contributes: $10,000 cash, property worth 40,000 (5000 basis) with a related assumed recourse liability of 20,000. We have to calculate the corporations tax basis in noncash property received from the shareholder. The answer is as follows: the corps basis for the property transferred is the basis 5000 + recognized gain of 5000 = 10,000. However, I thought that a corp basis in property is the greater of : nbv+ gain recognized or debt assumed by the corp. with that in mind, I thought the corp basis would be the 20,000 recourse liability. Thanks for the help!