He can't take the credit if he buys from his grandfather.
IRS Form 5405 says that a claim cannot be filed if they acquired the property from a related person which includes spouse, ancestors (parents, grandparents, etc.) or lineal descendants (children, grandchildren, etc.)