1031 exchange and basis

I posted this over in the answer to another question, but realize it is really its own question. Sorry for it appearing it two places:

We did a 1031 in 2004 and then exhanged that property in 2008. We just sold that property in an installment sale yesterday. Unfortunately, I cannot locate the actual Turbo Tax files from those years (or can locate them but not be able to figure out how to open them after so long), and I cannot recall what Turbo Tax did with the exchange expenses. I do have .pdfs of both exchange year's taxes. The supporting details of form 8824 in 2008 enumerate expenses (commission, exchange fees, recording and escrow fees etc.) of $51,000 related to the transaction. Will those have been added in by Turbo Tax to the basis of the property received in 2008 so that the cost basis shown on Form 8824, Part III, Line 25 (Basis of Like-Kind Property Received)  INCLUDES those amounts and is what I should use for the 2025 sale? Or have those been included in Line 18, the basis of the property given up? On the 2004 return, the basis of the property we gave up and the property we received were both listed as 268,335, and on the 2008 return each property's basis is listed as 291,351, a difference of $23, 016. We had several capital improvements on the property that we gave up in 2008, so it is plausible that this $23,016 is just those. So does the new basis of the property acquired in 2008 not yet include the $51,000 in expenses that we can now add to the basis in calculating the taxable gain on our 2025 sale?

a minute ago