Deductions & credits

Since you elected to treat it as your own (assuming the custodian retitled it), that basis is now added to your prior basis.

Whose SSN is on the 1099-R ?