OK, let's go through it step by step.
1. A purchases the property. No problem. What was the purchase price?
2. A "quitclaims" property to B.
o Was the property sold to B? subject to the outstanding mortgage?
o Was the equity in the property gifted to B subject to the mortgage? What was the fair market value of the property at the time it was "quitclaimed" to B? Gift tax return filed, if required?
3. B "rents" the property to "child". What were the terms? What were the terms of "rental" to "various people"?
What specific tax deductions were taken? Was rental income reported? What does "rent at cost" mean? What costs were covered, considered?
4. B "Quitclaims" property back to A. B "continues to rent it "at cost", paying mortgage (which is non-deductible to B), since B no longer owns the property nor is B obligated on the mortgage. Did B report rental income? B would not be entitled to depreciation deductions either. If B received "rent" tax would be taxable & only operating expenses PAID by B (not mortgage interest or depreciation), would have been deductible by B.
5. 15 years pass. Sounds like B may have claimed non-deductible interest expense. A couldn't deduct as A didn't pay mortgage. What happened when A received 1098 from Mortgagee?
6. A takes over the rental. Was rental income reported? How (where on A's tax return) were deductions claimed?
What was the basis (cost) used for depreciation? Was there an allocation to the value of the non depreciable land made?
7. There's no issue with respect to A only claiming depreciation for the 5 years (out of 15) that A rented the property. If A sells the property to a sibling, A will have a gain or loss based upon the difference between his adjusted tax basis in the property (which sounds like his original cost less the 5 years of depreciation he claimed), unless there was some adjustment at the time of the transfers to & from B (ie. what was the deed consideration for those transfers), or was it nominal?. A would also have a reportable gift (no gift tax due) on Form 709 for the year when the property is sold to the sibling for 50% of the appraised value.
In summary, there's no much of a tax issue (income or gift tax) for the sale by A to his/her Sibling, the only issues are the income tax implications of the period between the initial transfer by A to B and the end of the last period of ownership by A when the property was rented. It is difficult to measure what that income tax exposure might be without knowing what all the figures are and that would be quite a project to figure out; from a practical standpoint, most if not all of those tax years are closed so the only impact would be on the last 3 "open years", and on any subsequent tax years.